diff --git a/.github/scripts/end2end/run-e2e-ctst.sh b/.github/scripts/end2end/run-e2e-ctst.sh index d51ee69cfd..77f263ff5d 100755 --- a/.github/scripts/end2end/run-e2e-ctst.sh +++ b/.github/scripts/end2end/run-e2e-ctst.sh @@ -2,7 +2,7 @@ set -exu ZENKO_NAME=${1:-end2end} -COMMAND=${2:-"premerge"} +COMMAND=${2:-"only"} PARALLEL_RUNS=${PARALLEL_RUNS:-$(( ( $(nproc) + 1 ) / 2 ))} RETRIES=${4:-3} diff --git a/solution/deps.yaml b/solution/deps.yaml index 13befb877e..d8d22276a6 100644 --- a/solution/deps.yaml +++ b/solution/deps.yaml @@ -13,10 +13,10 @@ busybox: tag: 1.36.1 envsubst: BUSYBOX_TAG cloudserver: - sourceRegistry: ghcr.io/scality + sourceRegistry: ghcr.io/scality/playground/wlardier dashboard: cloudserver/cloudserver-dashboards image: cloudserver - tag: 8.8.36 + tag: 8.8.1061 envsubst: CLOUDSERVER_TAG drctl: sourceRegistry: ghcr.io/scality @@ -103,10 +103,10 @@ s3utils: tag: 1.14.14 envsubst: S3UTILS_TAG scuba: - sourceRegistry: ghcr.io/scality + sourceRegistry: ghcr.io/scality/playground/wlardier dashboard: scuba/scuba-dashboards image: scuba - tag: 1.0.8 + tag: 1.0.54 envsubst: SCUBA_TAG sorbet: sourceRegistry: ghcr.io/scality diff --git a/tests/ctst/features/quotas/Quotas.feature b/tests/ctst/features/quotas/Quotas.feature index ec111faa51..4184fd6075 100644 --- a/tests/ctst/features/quotas/Quotas.feature +++ b/tests/ctst/features/quotas/Quotas.feature @@ -7,6 +7,7 @@ Feature: Quota Management for APIs @Quotas @CronJob @DataWrite + @Only Scenario Outline: Quotas are evaluated during write operations Given an action "" And an upload size of B for the object "" @@ -68,6 +69,7 @@ Feature: Quota Management for APIs @CronJob @DataDeletion @NonVersioned + @Only Scenario Outline: Quotas are affected by deletion operations Given an action "DeleteObject" And a permission to perform the "PutObject" action @@ -97,6 +99,47 @@ Feature: Quota Management for APIs | 100 | 0 | 200 | IAM_USER | | 100 | 200 | 200 | IAM_USER | + @2.6.0 + @PreMerge + @Quotas + @CronJob + @DataDeletion + @NonVersioned + @Only + Scenario Outline: Quotas are affected by deletion operations between count items runs + Given an action "DeleteObject" + And a permission to perform the "PutObject" action + And a STORAGE_MANAGER type + And a bucket quota set to 10000 B + And an account quota set to 10000 B + And an upload size of 1000 B for the object "obj-1" + And a bucket quota set to B + And an account quota set to B + And a type + And an environment setup for the API + And an "existing" IAM Policy that "applies" with "ALLOW" effect for the current API + When I wait 3 seconds + And I PUT an object with size + Then the API should "fail" with "QuotaExceeded" + When the "count-items" cronjobs completes without error + When I wait 3 seconds + # At this point if negative inflights are not supported, write should + # not be possible, as the previous inflights are now part of the current + # metrics. + And i delete object "obj-1" + And I wait 3 seconds + And I PUT an object with size + Then the API should "succeed" with "" + + Examples: + | uploadSize | bucketQuota | accountQuota | userType | + | 100 | 200 | 0 | ACCOUNT | + | 100 | 0 | 200 | ACCOUNT | + | 100 | 200 | 200 | ACCOUNT | + | 100 | 200 | 0 | IAM_USER | + | 100 | 0 | 200 | IAM_USER | + | 100 | 200 | 200 | IAM_USER | + @2.6.0 @PreMerge @Quotas @@ -129,3 +172,34 @@ Feature: Quota Management for APIs | RestoreObject | 100 | 0 | 99 | IAM_USER | fail | QuotaExceeded | 3 | | RestoreObject | 100 | 99 | 99 | IAM_USER | fail | QuotaExceeded | 3 | | RestoreObject | 100 | 101 | 101 | IAM_USER | succeed | | 3 | + + @2.8.0 + @PreMerge + @Quotas + @Restore + @Dmf + @ColdStorage + @Only + Scenario Outline: Restored object expiration updates quotas + Given an action "" + And a STORAGE_MANAGER type + And a transition workflow to "e2e-cold" location + And an upload size of B for the object "obj-1" + Then object "obj-1" should be "transitioned" and have the storage class "e2e-cold" + Given a bucket quota set to B + And an account quota set to B + And a type + And an environment setup for the API + And an "existing" IAM Policy that "applies" with "ALLOW" effect for the current API + When i restore object "" for 5 days + Then the API should "succeed" with "" + And object "obj-1" should expire in days + When i wait for 5 days + Then object "obj-1" should be "cold" and have the storage class "e2e-cold" + + Examples: + | action | uploadSize | bucketQuota | accountQuota | userType | + | RestoreObject | 100 | 0 | 0 | ACCOUNT | + | RestoreObject | 100 | 101 | 101 | ACCOUNT | + | RestoreObject | 100 | 0 | 0 | IAM_USER | + | RestoreObject | 100 | 101 | 101 | IAM_USER | \ No newline at end of file diff --git a/tests/ctst/run.sh b/tests/ctst/run.sh index 0b43cd7d16..c54fc14403 100755 --- a/tests/ctst/run.sh +++ b/tests/ctst/run.sh @@ -3,7 +3,7 @@ set -exu # script used for local testing -COMMAND=${1:-"premerge"} +COMMAND=${1:-"only"} PARALLEL_RUNS=${2:-4} # Enable SDK - setting this to false will run the CLI mode