From d88cc44a412455eaa6f3770ea68f7515af49735f Mon Sep 17 00:00:00 2001 From: Martishyn Andrii Date: Mon, 30 Mar 2026 14:10:00 +0300 Subject: [PATCH 1/2] Added tests for S3 commands, including self-tests, tests with repeat, tests with variation file, tests with conditions for bucket/file. --- .../data/variations/variations_s3.csv | 3 + .../s3/condition_bucket/expected_1.json | 1 + .../storage/s3/condition_bucket/scenario.xml | 108 ++++++++++++++++++ .../storage/s3/condition_bucket/upload_1.json | 1 + .../storage/s3/condition_file/expected_1.json | 1 + .../storage/s3/condition_file/expected_2.json | 1 + .../storage/s3/condition_file/scenario.xml | 100 ++++++++++++++++ .../storage/s3/condition_file/upload_1.json | 1 + .../storage/s3/condition_file/upload_2.json | 1 + .../storage/s3/repeat/expected_1.json | 1 + .../scenarios/storage/s3/repeat/scenario.xml | 57 +++++++++ .../scenarios/storage/s3/repeat/upload_1.json | 1 + .../scenarios/storage/s3/self/expected_1.json | 1 + .../scenarios/storage/s3/self/expected_2.json | 1 + .../scenarios/storage/s3/self/scenario.xml | 100 ++++++++++++++++ .../scenarios/storage/s3/self/upload_1.json | 1 + .../scenarios/storage/s3/self/upload_2.json | 1 + .../storage/s3/variations/expected_1.json | 1 + .../storage/s3/variations/expected_2.json | 1 + .../storage/s3/variations/scenario.xml | 63 ++++++++++ .../storage/s3/variations/upload_1.json | 1 + .../storage/s3/variations/upload_2.json | 1 + 22 files changed, 447 insertions(+) create mode 100644 REGRESSION/resources/data/variations/variations_s3.csv create mode 100644 REGRESSION/resources/scenarios/storage/s3/condition_bucket/expected_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/condition_bucket/scenario.xml create mode 100644 REGRESSION/resources/scenarios/storage/s3/condition_bucket/upload_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/condition_file/expected_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/condition_file/expected_2.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/condition_file/scenario.xml create mode 100644 REGRESSION/resources/scenarios/storage/s3/condition_file/upload_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/condition_file/upload_2.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/repeat/expected_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/repeat/scenario.xml create mode 100644 REGRESSION/resources/scenarios/storage/s3/repeat/upload_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/self/expected_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/self/expected_2.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/self/scenario.xml create mode 100644 REGRESSION/resources/scenarios/storage/s3/self/upload_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/self/upload_2.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/variations/expected_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/variations/expected_2.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/variations/scenario.xml create mode 100644 REGRESSION/resources/scenarios/storage/s3/variations/upload_1.json create mode 100644 REGRESSION/resources/scenarios/storage/s3/variations/upload_2.json diff --git a/REGRESSION/resources/data/variations/variations_s3.csv b/REGRESSION/resources/data/variations/variations_s3.csv new file mode 100644 index 0000000..f664c95 --- /dev/null +++ b/REGRESSION/resources/data/variations/variations_s3.csv @@ -0,0 +1,3 @@ +variable_bucket,variable_file,variable_expected,content_expected +testlum-var-bucket-1,upload_1.json,1,{"Testlum": "TOP"} +testlum-var-bucket-2,upload_2.json,2,{"Testlum": "The Best"} diff --git a/REGRESSION/resources/scenarios/storage/s3/condition_bucket/expected_1.json b/REGRESSION/resources/scenarios/storage/s3/condition_bucket/expected_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/condition_bucket/expected_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/condition_bucket/scenario.xml b/REGRESSION/resources/scenarios/storage/s3/condition_bucket/scenario.xml new file mode 100644 index 0000000..3ce39bf --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/condition_bucket/scenario.xml @@ -0,0 +1,108 @@ + + + + Condition bucket test: remove bucket only if condition is true, verify bucket still exists if condition is false + S3 Condition Bucket scenario + + + + s3 + + + + + testlum-cond-true-bucket + + + + + + + + testlum-cond-true-bucket + + + + + + + + testlum-cond-false-bucket + + + + + + + + testlum-cond-false-bucket + + + + + + upload_1.json + + + + + + + expected_1.json + + + + + + + testlum-cond-and-bucket + + + + + + + + + + + + testlum-cond-and-bucket + + + + + + upload_1.json + + + + + + + expected_1.json + + + + + diff --git a/REGRESSION/resources/scenarios/storage/s3/condition_bucket/upload_1.json b/REGRESSION/resources/scenarios/storage/s3/condition_bucket/upload_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/condition_bucket/upload_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/condition_file/expected_1.json b/REGRESSION/resources/scenarios/storage/s3/condition_file/expected_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/condition_file/expected_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/condition_file/expected_2.json b/REGRESSION/resources/scenarios/storage/s3/condition_file/expected_2.json new file mode 100644 index 0000000..e123982 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/condition_file/expected_2.json @@ -0,0 +1 @@ +{"Testlum": "The Best"} diff --git a/REGRESSION/resources/scenarios/storage/s3/condition_file/scenario.xml b/REGRESSION/resources/scenarios/storage/s3/condition_file/scenario.xml new file mode 100644 index 0000000..f6ea331 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/condition_file/scenario.xml @@ -0,0 +1,100 @@ + + + + Condition file test: remove file only if condition is true, verify other files in bucket remain unchanged if condition is false + S3 Condition File scenario + + + + s3 + + + + + testlum-cond-file-bucket + + + + + + upload_1.json + + + + + + upload_2.json + + + + + + + expected_1.json + + + + + + + + expected_2.json + + + + + + + + + + + + + + + + + + + + + + + + expected_2.json + + + + + + + + {"Testlum": "The Best"} + + + + + diff --git a/REGRESSION/resources/scenarios/storage/s3/condition_file/upload_1.json b/REGRESSION/resources/scenarios/storage/s3/condition_file/upload_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/condition_file/upload_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/condition_file/upload_2.json b/REGRESSION/resources/scenarios/storage/s3/condition_file/upload_2.json new file mode 100644 index 0000000..e123982 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/condition_file/upload_2.json @@ -0,0 +1 @@ +{"Testlum": "The Best"} diff --git a/REGRESSION/resources/scenarios/storage/s3/repeat/expected_1.json b/REGRESSION/resources/scenarios/storage/s3/repeat/expected_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/repeat/expected_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/repeat/scenario.xml b/REGRESSION/resources/scenarios/storage/s3/repeat/scenario.xml new file mode 100644 index 0000000..2bd6c29 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/repeat/scenario.xml @@ -0,0 +1,57 @@ + + + + Repeat S3 test: execute storage upload and verify operation multiple times, validate operation + result for each execution + + S3 Repeat scenario + + + + s3 + + + + + + + testlum-repeat-bucket-one + + + + + + upload_1.json + + + + + + + expected_1.json + + + + + + + + {"Testlum": "TOP"} + + + + + + + testlum-repeat-bucket-one + + + + + diff --git a/REGRESSION/resources/scenarios/storage/s3/repeat/upload_1.json b/REGRESSION/resources/scenarios/storage/s3/repeat/upload_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/repeat/upload_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/self/expected_1.json b/REGRESSION/resources/scenarios/storage/s3/self/expected_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/self/expected_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/self/expected_2.json b/REGRESSION/resources/scenarios/storage/s3/self/expected_2.json new file mode 100644 index 0000000..e123982 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/self/expected_2.json @@ -0,0 +1 @@ +{"Testlum": "The Best"} diff --git a/REGRESSION/resources/scenarios/storage/s3/self/scenario.xml b/REGRESSION/resources/scenarios/storage/s3/self/scenario.xml new file mode 100644 index 0000000..2dad9c8 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/self/scenario.xml @@ -0,0 +1,100 @@ + + + + Self S3 test: create bucket, upload file, verify upload by download and compare, remove file, remove bucket + S3 Self scenario + + + + s3 + + + + + testlum-self-bucket-one + + + + + + upload_1.json + + + + + + + expected_1.json + + + + + + + + {"Testlum": "TOP"} + + + + + + + + + + + + + testlum-self-bucket-one + + + + + + testlum-self-bucket-one + + + + + + upload_1.json + + + + + + + expected_1.json + + + + + + + + + + + + + testlum-self-bucket-one + + + + diff --git a/REGRESSION/resources/scenarios/storage/s3/self/upload_1.json b/REGRESSION/resources/scenarios/storage/s3/self/upload_1.json new file mode 100644 index 0000000..14e817d --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/self/upload_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} \ No newline at end of file diff --git a/REGRESSION/resources/scenarios/storage/s3/self/upload_2.json b/REGRESSION/resources/scenarios/storage/s3/self/upload_2.json new file mode 100644 index 0000000..e123982 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/self/upload_2.json @@ -0,0 +1 @@ +{"Testlum": "The Best"} diff --git a/REGRESSION/resources/scenarios/storage/s3/variations/expected_1.json b/REGRESSION/resources/scenarios/storage/s3/variations/expected_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/variations/expected_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/variations/expected_2.json b/REGRESSION/resources/scenarios/storage/s3/variations/expected_2.json new file mode 100644 index 0000000..e123982 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/variations/expected_2.json @@ -0,0 +1 @@ +{"Testlum": "The Best"} diff --git a/REGRESSION/resources/scenarios/storage/s3/variations/scenario.xml b/REGRESSION/resources/scenarios/storage/s3/variations/scenario.xml new file mode 100644 index 0000000..71931d8 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/variations/scenario.xml @@ -0,0 +1,63 @@ + + + + Variations S3 test: create bucket, upload file, verify upload, remove file and bucket using variation variables - runs once per CSV row + S3 Variations scenario + + + + variations_s3.csv + s3 + + + + + {{variable_bucket}} + + + + + + {{variable_file}} + + + + + + + expected_{{variable_expected}}.json + + + + + + + + {{content_expected}} + + + + + + + + + + + + + {{variable_bucket}} + + + + diff --git a/REGRESSION/resources/scenarios/storage/s3/variations/upload_1.json b/REGRESSION/resources/scenarios/storage/s3/variations/upload_1.json new file mode 100644 index 0000000..a09bdfb --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/variations/upload_1.json @@ -0,0 +1 @@ +{"Testlum": "TOP"} diff --git a/REGRESSION/resources/scenarios/storage/s3/variations/upload_2.json b/REGRESSION/resources/scenarios/storage/s3/variations/upload_2.json new file mode 100644 index 0000000..e123982 --- /dev/null +++ b/REGRESSION/resources/scenarios/storage/s3/variations/upload_2.json @@ -0,0 +1 @@ +{"Testlum": "The Best"} From 6515f38df1bb5407bb3e741df503c31691639c2f Mon Sep 17 00:00:00 2001 From: Martishyn Andrii Date: Tue, 31 Mar 2026 12:03:20 +0300 Subject: [PATCH 2/2] Added tests for lambda, reverted 'hello-world-python' function. Fixed container name for mega-test-api --- REGRESSION/resources/config-local.xml | 54 +++++++++--------- .../data/variations/variations_lambda.csv | 3 + .../http/lambda/condition/body_1.json | 5 ++ .../http/lambda/condition/expected_1.json | 8 +++ .../http/lambda/condition/expected_2.json | 8 +++ .../http/lambda/condition/scenario.xml | 53 +++++++++++++++++ .../http/lambda/{ => e2e}/body_2.json | 0 .../http/lambda/{ => e2e}/expected_2.json | 0 .../http/lambda/{ => e2e}/expected_3.json | 0 .../http/lambda/{ => e2e}/expected_4.json | 0 .../http/lambda/{ => e2e}/expected_5.json | 0 .../{expected_7.json => e2e/expected_6.json} | 0 .../scenarios/http/lambda/e2e/expected_7.json | 31 ++++++++++ .../http/lambda/{ => e2e}/expected_8.json | 0 .../http/lambda/{ => e2e}/request_3.json | 0 .../http/lambda/{ => e2e}/scenario.xml | 0 .../scenarios/http/lambda/expected_6.json | 31 ---------- .../scenarios/http/lambda/repeat/body_1.json | 5 ++ .../http/lambda/repeat/expected_1.json | 8 +++ .../http/lambda/repeat/expected_2.json | 8 +++ .../scenarios/http/lambda/repeat/scenario.xml | 28 +++++++++ .../scenarios/http/lambda/self/body_1.json | 5 ++ .../http/lambda/self/expected_1.json | 8 +++ .../http/lambda/self/expected_2.json | 8 +++ .../scenarios/http/lambda/self/scenario.xml | 43 ++++++++++++++ .../http/lambda/variations/expected_1.json | 8 +++ .../http/lambda/variations/expected_2.json | 8 +++ .../http/lambda/variations/scenario.xml | 33 +++++++++++ docker/docker-compose-mega-test-app.yaml | 4 +- docker/init-data/aws/create-functions.sh | 8 +++ docker/init-data/aws/lambda-functions.zip | Bin 2801 -> 3748 bytes 31 files changed, 307 insertions(+), 60 deletions(-) create mode 100644 REGRESSION/resources/data/variations/variations_lambda.csv create mode 100644 REGRESSION/resources/scenarios/http/lambda/condition/body_1.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/condition/expected_1.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/condition/expected_2.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/condition/scenario.xml rename REGRESSION/resources/scenarios/http/lambda/{ => e2e}/body_2.json (100%) rename REGRESSION/resources/scenarios/http/lambda/{ => e2e}/expected_2.json (100%) rename REGRESSION/resources/scenarios/http/lambda/{ => e2e}/expected_3.json (100%) rename REGRESSION/resources/scenarios/http/lambda/{ => e2e}/expected_4.json (100%) rename REGRESSION/resources/scenarios/http/lambda/{ => e2e}/expected_5.json (100%) rename REGRESSION/resources/scenarios/http/lambda/{expected_7.json => e2e/expected_6.json} (100%) create mode 100644 REGRESSION/resources/scenarios/http/lambda/e2e/expected_7.json rename REGRESSION/resources/scenarios/http/lambda/{ => e2e}/expected_8.json (100%) rename REGRESSION/resources/scenarios/http/lambda/{ => e2e}/request_3.json (100%) rename REGRESSION/resources/scenarios/http/lambda/{ => e2e}/scenario.xml (100%) delete mode 100644 REGRESSION/resources/scenarios/http/lambda/expected_6.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/repeat/body_1.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/repeat/expected_1.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/repeat/expected_2.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/repeat/scenario.xml create mode 100644 REGRESSION/resources/scenarios/http/lambda/self/body_1.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/self/expected_1.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/self/expected_2.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/self/scenario.xml create mode 100644 REGRESSION/resources/scenarios/http/lambda/variations/expected_1.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/variations/expected_2.json create mode 100644 REGRESSION/resources/scenarios/http/lambda/variations/scenario.xml diff --git a/REGRESSION/resources/config-local.xml b/REGRESSION/resources/config-local.xml index fc7fd2e..7d060f3 100644 --- a/REGRESSION/resources/config-local.xml +++ b/REGRESSION/resources/config-local.xml @@ -8,50 +8,50 @@ - + - - + + - + - - + + - - + + - - + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - + @@ -66,9 +66,9 @@ - + - + diff --git a/REGRESSION/resources/data/variations/variations_lambda.csv b/REGRESSION/resources/data/variations/variations_lambda.csv new file mode 100644 index 0000000..663035f --- /dev/null +++ b/REGRESSION/resources/data/variations/variations_lambda.csv @@ -0,0 +1,3 @@ +average,name,subject,marks,header,headerValue,expected +50,Bob,Physics,"50,50,50,50",X-Amz-Executed-Version,$LATEST,expected_1 +50,John,Physics,"70,60,60,50",X-Amz-Executed-Version,$LATEST,expected_2 diff --git a/REGRESSION/resources/scenarios/http/lambda/condition/body_1.json b/REGRESSION/resources/scenarios/http/lambda/condition/body_1.json new file mode 100644 index 0000000..6610cf1 --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/condition/body_1.json @@ -0,0 +1,5 @@ +{ + "name": "Alice", + "subject": "Mathematics", + "scores": [90, 85, 92, 88] +} diff --git a/REGRESSION/resources/scenarios/http/lambda/condition/expected_1.json b/REGRESSION/resources/scenarios/http/lambda/condition/expected_1.json new file mode 100644 index 0000000..48b8f5b --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/condition/expected_1.json @@ -0,0 +1,8 @@ +{ + "student": "Alice", + "subject": "Mathematics", + "scores": [90, 85, 92, 88], + "average": 88.75, + "passed": true, + "status": "PASSED" +} diff --git a/REGRESSION/resources/scenarios/http/lambda/condition/expected_2.json b/REGRESSION/resources/scenarios/http/lambda/condition/expected_2.json new file mode 100644 index 0000000..38c749e --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/condition/expected_2.json @@ -0,0 +1,8 @@ +{ + "student": "Bob", + "subject": "Physics", + "scores": [40, 55, 50, 45], + "average": 47.5, + "passed": false, + "status": "FAILED" +} diff --git a/REGRESSION/resources/scenarios/http/lambda/condition/scenario.xml b/REGRESSION/resources/scenarios/http/lambda/condition/scenario.xml new file mode 100644 index 0000000..aed6134 --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/condition/scenario.xml @@ -0,0 +1,53 @@ + + + + Self test for student-scores-python: student score processor - calculates average, pass/fail status + + AWS Lambda Self scenario + + + + lambda + + + + + + + + + +
+ + + + + + + + + { + "name": "Bob", + "subject": "Physics", + "scores": [40, 55, 50, 45] + } + + + +
+ + + + diff --git a/REGRESSION/resources/scenarios/http/lambda/body_2.json b/REGRESSION/resources/scenarios/http/lambda/e2e/body_2.json similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/body_2.json rename to REGRESSION/resources/scenarios/http/lambda/e2e/body_2.json diff --git a/REGRESSION/resources/scenarios/http/lambda/expected_2.json b/REGRESSION/resources/scenarios/http/lambda/e2e/expected_2.json similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/expected_2.json rename to REGRESSION/resources/scenarios/http/lambda/e2e/expected_2.json diff --git a/REGRESSION/resources/scenarios/http/lambda/expected_3.json b/REGRESSION/resources/scenarios/http/lambda/e2e/expected_3.json similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/expected_3.json rename to REGRESSION/resources/scenarios/http/lambda/e2e/expected_3.json diff --git a/REGRESSION/resources/scenarios/http/lambda/expected_4.json b/REGRESSION/resources/scenarios/http/lambda/e2e/expected_4.json similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/expected_4.json rename to REGRESSION/resources/scenarios/http/lambda/e2e/expected_4.json diff --git a/REGRESSION/resources/scenarios/http/lambda/expected_5.json b/REGRESSION/resources/scenarios/http/lambda/e2e/expected_5.json similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/expected_5.json rename to REGRESSION/resources/scenarios/http/lambda/e2e/expected_5.json diff --git a/REGRESSION/resources/scenarios/http/lambda/expected_7.json b/REGRESSION/resources/scenarios/http/lambda/e2e/expected_6.json similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/expected_7.json rename to REGRESSION/resources/scenarios/http/lambda/e2e/expected_6.json diff --git a/REGRESSION/resources/scenarios/http/lambda/e2e/expected_7.json b/REGRESSION/resources/scenarios/http/lambda/e2e/expected_7.json new file mode 100644 index 0000000..e04ded6 --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/e2e/expected_7.json @@ -0,0 +1,31 @@ +[ { + "id" : "1", + "author" : "J. K. Rowling", + "title" : "Harry Potter and Philosopher's Stone", + "number" : 1 +}, { + "id" : "2", + "author" : "J. R. R. Tolkien", + "title" : "The Lord of the Rings: The Fellowship of the Ring", + "number" : 2 +}, { + "id" : "3", + "author" : "George R. R. Martin", + "title" : "A Game of Thrones", + "number" : 3 +}, { + "id" : "4", + "author" : "Fredrik Backman", + "title" : "A Man Called Ove", + "number" : 4 +}, { + "id" : "5", + "author" : "Ivan Franko", + "title" : "Kamenyari", + "number" : 5 +}, { + "id" : "6", + "author" : "Taras Shevchenko", + "title" : "Kobzar", + "number" : 6 +} ] \ No newline at end of file diff --git a/REGRESSION/resources/scenarios/http/lambda/expected_8.json b/REGRESSION/resources/scenarios/http/lambda/e2e/expected_8.json similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/expected_8.json rename to REGRESSION/resources/scenarios/http/lambda/e2e/expected_8.json diff --git a/REGRESSION/resources/scenarios/http/lambda/request_3.json b/REGRESSION/resources/scenarios/http/lambda/e2e/request_3.json similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/request_3.json rename to REGRESSION/resources/scenarios/http/lambda/e2e/request_3.json diff --git a/REGRESSION/resources/scenarios/http/lambda/scenario.xml b/REGRESSION/resources/scenarios/http/lambda/e2e/scenario.xml similarity index 100% rename from REGRESSION/resources/scenarios/http/lambda/scenario.xml rename to REGRESSION/resources/scenarios/http/lambda/e2e/scenario.xml diff --git a/REGRESSION/resources/scenarios/http/lambda/expected_6.json b/REGRESSION/resources/scenarios/http/lambda/expected_6.json deleted file mode 100644 index e161a3e..0000000 --- a/REGRESSION/resources/scenarios/http/lambda/expected_6.json +++ /dev/null @@ -1,31 +0,0 @@ -[ { - "number" : 1, - "author" : "J. K. Rowling", - "id" : "1", - "title" : "Harry Potter and Philosopher's Stone" -}, { - "number" : 2, - "author" : "J. R. R. Tolkien", - "id" : "2", - "title" : "The Lord of the Rings: The Fellowship of the Ring" -}, { - "number" : 3, - "author" : "George R. R. Martin", - "id" : "3", - "title" : "A Game of Thrones" -}, { - "number" : 4, - "author" : "Fredrik Backman", - "id" : "4", - "title" : "A Man Called Ove" -}, { - "number" : 5, - "author" : "Ivan Franko", - "id" : "5", - "title" : "Kamenyari" -}, { - "number" : 6, - "author" : "Taras Shevchenko", - "id" : "6", - "title" : "Kobzar" -} ] \ No newline at end of file diff --git a/REGRESSION/resources/scenarios/http/lambda/repeat/body_1.json b/REGRESSION/resources/scenarios/http/lambda/repeat/body_1.json new file mode 100644 index 0000000..6610cf1 --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/repeat/body_1.json @@ -0,0 +1,5 @@ +{ + "name": "Alice", + "subject": "Mathematics", + "scores": [90, 85, 92, 88] +} diff --git a/REGRESSION/resources/scenarios/http/lambda/repeat/expected_1.json b/REGRESSION/resources/scenarios/http/lambda/repeat/expected_1.json new file mode 100644 index 0000000..48b8f5b --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/repeat/expected_1.json @@ -0,0 +1,8 @@ +{ + "student": "Alice", + "subject": "Mathematics", + "scores": [90, 85, 92, 88], + "average": 88.75, + "passed": true, + "status": "PASSED" +} diff --git a/REGRESSION/resources/scenarios/http/lambda/repeat/expected_2.json b/REGRESSION/resources/scenarios/http/lambda/repeat/expected_2.json new file mode 100644 index 0000000..38c749e --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/repeat/expected_2.json @@ -0,0 +1,8 @@ +{ + "student": "Bob", + "subject": "Physics", + "scores": [40, 55, 50, 45], + "average": 47.5, + "passed": false, + "status": "FAILED" +} diff --git a/REGRESSION/resources/scenarios/http/lambda/repeat/scenario.xml b/REGRESSION/resources/scenarios/http/lambda/repeat/scenario.xml new file mode 100644 index 0000000..8d5bfd7 --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/repeat/scenario.xml @@ -0,0 +1,28 @@ + + + + Repeat test for student-scores-python lambda: student score processor - calculates average, pass/fail status + + AWS Lambda Repeat scenario + + + + lambda + + + + + + + + +
+ + + + + diff --git a/REGRESSION/resources/scenarios/http/lambda/self/body_1.json b/REGRESSION/resources/scenarios/http/lambda/self/body_1.json new file mode 100644 index 0000000..6610cf1 --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/self/body_1.json @@ -0,0 +1,5 @@ +{ + "name": "Alice", + "subject": "Mathematics", + "scores": [90, 85, 92, 88] +} diff --git a/REGRESSION/resources/scenarios/http/lambda/self/expected_1.json b/REGRESSION/resources/scenarios/http/lambda/self/expected_1.json new file mode 100644 index 0000000..48b8f5b --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/self/expected_1.json @@ -0,0 +1,8 @@ +{ + "student": "Alice", + "subject": "Mathematics", + "scores": [90, 85, 92, 88], + "average": 88.75, + "passed": true, + "status": "PASSED" +} diff --git a/REGRESSION/resources/scenarios/http/lambda/self/expected_2.json b/REGRESSION/resources/scenarios/http/lambda/self/expected_2.json new file mode 100644 index 0000000..38c749e --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/self/expected_2.json @@ -0,0 +1,8 @@ +{ + "student": "Bob", + "subject": "Physics", + "scores": [40, 55, 50, 45], + "average": 47.5, + "passed": false, + "status": "FAILED" +} diff --git a/REGRESSION/resources/scenarios/http/lambda/self/scenario.xml b/REGRESSION/resources/scenarios/http/lambda/self/scenario.xml new file mode 100644 index 0000000..e2b12d9 --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/self/scenario.xml @@ -0,0 +1,43 @@ + + + + Self test for student-scores-python lambda: student score processor - calculates average,pass/fail status + + AWS Lambda Self scenario + + + + lambda + + + + + + + +
+ + + + + + + { + "name": "Bob", + "subject": "Physics", + "scores": [40, 55, 50, 45] + } + + + +
+ + + + diff --git a/REGRESSION/resources/scenarios/http/lambda/variations/expected_1.json b/REGRESSION/resources/scenarios/http/lambda/variations/expected_1.json new file mode 100644 index 0000000..41ebb0e --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/variations/expected_1.json @@ -0,0 +1,8 @@ +{ + "student" : "Bob", + "subject" : "Physics", + "scores" : [ 50, 50, 50, 50 ], + "average" : 50.0, + "passed" : false, + "status" : "FAILED" +} \ No newline at end of file diff --git a/REGRESSION/resources/scenarios/http/lambda/variations/expected_2.json b/REGRESSION/resources/scenarios/http/lambda/variations/expected_2.json new file mode 100644 index 0000000..43ec54e --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/variations/expected_2.json @@ -0,0 +1,8 @@ +{ + "student" : "John", + "subject" : "Physics", + "scores" : [ 70, 60, 60, 50 ], + "average" : 60.0, + "passed" : true, + "status" : "PASSED" +} \ No newline at end of file diff --git a/REGRESSION/resources/scenarios/http/lambda/variations/scenario.xml b/REGRESSION/resources/scenarios/http/lambda/variations/scenario.xml new file mode 100644 index 0000000..5b28050 --- /dev/null +++ b/REGRESSION/resources/scenarios/http/lambda/variations/scenario.xml @@ -0,0 +1,33 @@ + + + + Variations test for student-scores lambda: student score processor - calculates average, pass/fail status + + AWS Lambda Variations scenario + + + + variations_lambda.csv + lambda + + + + + + { + "name": "{{name}}", + "subject": "{{subject}}", + "scores": [{{marks}}] + } + + + +
+ + + + diff --git a/docker/docker-compose-mega-test-app.yaml b/docker/docker-compose-mega-test-app.yaml index d116b75..5b8b050 100644 --- a/docker/docker-compose-mega-test-app.yaml +++ b/docker/docker-compose-mega-test-app.yaml @@ -23,7 +23,7 @@ services: context: ../TEST-API dockerfile: Dockerfile.jenkins image: mega-test-api - container_name: maga-test-api + container_name: mega-test-api ports: - "8080:8080" networks: @@ -41,7 +41,7 @@ services: context: ../TEST-API dockerfile: Dockerfile.local image: mega-test-api - container_name: maga-test-api + container_name: mega-test-api ports: - "8080:8080" networks: diff --git a/docker/init-data/aws/create-functions.sh b/docker/init-data/aws/create-functions.sh index 6ba8dd4..96ae688 100755 --- a/docker/init-data/aws/create-functions.sh +++ b/docker/init-data/aws/create-functions.sh @@ -18,6 +18,14 @@ awslocal lambda create-function \ --role arn:aws:iam::000000000000:role/lambda-role \ --region eu-central-1 +awslocal lambda create-function \ + --function-name=student-scores-python \ + --runtime python3.9 \ + --zip-file fileb:///etc/localstack/init/ready.d/$ZIP_FILE_NAME \ + --handler student-scores-python.lambda_handler \ + --role arn:aws:iam::000000000000:role/lambda-role \ + --region eu-central-1 + awslocal lambda create-function \ --function-name=http-request-js \ --runtime nodejs18.x \ diff --git a/docker/init-data/aws/lambda-functions.zip b/docker/init-data/aws/lambda-functions.zip index 11f7aea9992927f89d1b130ea62c848a91e50193..c3d536c0545d4aa105df62a6486da2b087fec943 100644 GIT binary patch literal 3748 zcmc(hc{rQ-7RO^Zh>{j@39*fR@3mA$waOr3-!EfJt}Td!s%q^mDx$SjbG4W<549Do zwv3(9n4;4g)3mkK+SXRI!=Ub)yG-ABs#EjF?fX9O^W>kL^F6=w`JMB%LvwH*g75ixPe zIemhdA>UJgiYU{6bi`J1PB&^^E=cZNmsAphG9WdO@7eA&k$=TphvwnUhU8nM0U}=m zpWU9NB7su9y)nm3Z5`b-HN5v-_2pCjLH<4>{sBIIKFb(um*oR4X?6+h7vUU=LK18d zGD6Ag8RBW|6d9Rgc3)fc3Lt099Xr#6#4rPcbhMgMpCw&YiKdBui2ey}gY&`qE!P_p zD9!56;DBZx-hUKttTQ`vouvkbNDWK7gn$}CaRI*SzJwt4z{p5~Mlk7PoeGxm!LIzb zQ)lfvY`U}rT5O*loyvD26V0f!Onx4d7ik75!`HjCEG?PU3^p#`LaFlRvU`E zxTP)WC#qErb;iyLkwv`&`Zw^#$ys{Ho*x@qgCXKL|0OiehvS-#vuDNNhIL(Dy2`Do z^{%^|eLV3oX%%V==>&s{oGIaQ(^?ds{>^!Pu?~0&oC;MlxOaY~d|Fc>Yk;g1t)YU< z7C)kyt3|Ht{tNQ0e%#$&2s zOYSA_E*->;t5#5{n4hYDo{NDtvXir@Ww6@$!rw&Ka#Z-Fo;QY0TB$l{4r`yfim^|J zI)qCthOG|E*1E_}GP+O3n|29*jXs&0D3@wmCw2jDSGp2lweY@Pc~hD$ib%9%mz62% zsXi^&Jb2$?v}%K*Kt;4^GJ7-F12KlN{SRaDed<@>(--taY&;Dhuy4C%N~IQ*ED6su`4-wHOGoZobvV$U#0^Rh z-e;J6FTWxy#w(3ESBzbo#v5KOFg+r$D#P}}!SyvkWo%ia8MIFe;SrLO1a+gPZ&{te zC?-{_&Y+yPd_38)Ep1!r%75(2CPVCHe0h=y z)Wg?TRcffkl`Z!;Z_Q|XVNQsaVzRVE1N(E*m}*9n36g$5Tda}WW;Uq0qrT@FC z!u_gCc(JVAWG0Nb@4TVi7#cm6yIuQFQC0RlQQnj@1;O+isSadyUs0bi!>P~ws#5|ae63KC3grWOZCEot7;GwUHm-(tDQ|e!}pp^wsBj) zH<)j=3=oIo3WtJCYfAXt7kvuVA0N2W#pmZ<$UBUj$CO#N@Gnm+o5}6e)w?Yl7_Erp z86Gb|=~8*m7ErA{7+Iv74}QM5eW#b-aLYRN?)q_k_xQ_W(S)(i4YzKIxkR$!oY_X^ zXbz>b$FJdhs{;+PM_PqrPV9rBu0nF&&0_0etAL3&vVE>7@fRlwl_<*+opzj$F4g&cX D+d>Uw delta 1244 zcmZ1?`%!d)7{_Y{1_n_E1%}D_+@cDhA-oLiRj=M8tGgzpfN*IAHv=QfS4IW~77?Jr ziNWg_H%w+?R7X`g4^!pjL=NeCS%Kys(h?m^eTs^X0csw{nH0nvf)8~FO!qo>{;Ic* z#tF}>r#*G_Gp24(;dClJx2NQ+>Z+4E|yCv_%0PWrY!~x#S zKzDEe;SJGsVL$;ec*DfNAOQ42Zfbg>Zel^EZbnH-fnHWI#F3eb31F{a@y_PIj0uc_ z$VP!Ik)Eu`A+8QJ0~{hSBXIcBj~sta0sE8neQ04r2H2n1S9qKO`*Sisi=<^FGXsMl zx}S=Ho&q~)8Zf|T05OP0i=xemERBqOf5Z^MBgiy)1DgaSFnW}62gVCF6GmX{%5tcn zs->o{x9kALZvK=UQMQXhocJ|iZ^`IC8g