Skip to content

Commit

Permalink
Aws patch s3 upload (#40)
Browse files Browse the repository at this point in the history
Quick fix on AWS s3 uploading

* fix aws s3 upload

* update learn version

* set independent versioning

* Publish

 - @ln-maf/[email protected]
 - @ln-maf/[email protected]
 - @ln-maf/[email protected]
 - @ln-maf/[email protected]
 - @ln-maf/[email protected]
 - @ln-maf/[email protected]
 - @ln-maf/[email protected]

* fix aws s3 tests
  • Loading branch information
martdo02 authored Sep 8, 2022
1 parent 2d3c783 commit 6358fba
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 43 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
],
"useNx": false,
"useWorkspaces": true,
"version": "0.0.0"
"version": "independent"
}
10 changes: 5 additions & 5 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "2.0.0",
"version": "2.0.1",
"description": "",
"main": "index.js",
"scripts": {
Expand All @@ -17,21 +17,21 @@
"node-fetch": "^2.6.1"
},
"peerDependencies": {
"@ln-maf/core": "*",
"@cucumber/cucumber": ">= 7.0.0",
"@ln-maf/core": "*",
"chai": "^4.3.4"
},
"devDependencies": {
"@ln-maf/core": "*",
"@cucumber/cucumber": "8.2.0",
"@ln-maf/core": "^2.0.1",
"@ln-maf/validations": "file:../validations",
"nyc": "^15.1.0",
"eslint": "^8.18.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"multiple-cucumber-html-reporter": "^1.21.0"
"multiple-cucumber-html-reporter": "^1.21.0",
"nyc": "^15.1.0"
},
"gitHead": "2a575448a74cfaee5ec68fa10db24cf4ccade849",
"repository": {
Expand Down
6 changes: 6 additions & 0 deletions packages/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ This module provides scenarios where Gherkins/Cucumber is implemented for AWS.
```
require('@ln-maf/aws')
```
# Dev Testing

- Run `docker run --rm -it -p 4566:4566 -p 4510-4559:4510-4559 localstack/localstack:0.14.4` to spin up a localstack environment.
- Run `terraform apply -auto-approve` to prepare the localstack environment.
- Be sure environment variable `AWSENV` is set to false or does not exist
- Run individual tests, or run all tests using `npm t`

# Configurations

Expand Down
1 change: 0 additions & 1 deletion packages/aws/features/S3.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Feature: AWS: S3 Testing

Scenario Outline: File Upload
Given bucket "<bucket>" exists on S3
When set "directory" to "test/"
And test file "<file>" is created
And file "./test/<file>" is uploaded to bucket "<bucket>" as key "<s3FilePath><key>"
Then file exists with name "<key>" at path "<s3FilePath>" in bucket "<bucket>"
Expand Down
16 changes: 8 additions & 8 deletions packages/aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "2.0.0",
"version": "2.0.2",
"description": "Setup for AWS on MAF. This contains s3, dynamoDB, sqs, ecs, cloudwatch, and lambda stepDefinitions",
"main": "index.js",
"scripts": {
Expand All @@ -12,31 +12,31 @@
"author": "Dominick Martelly",
"license": "Apache-2.0",
"dependencies": {
"@ln-maf/core": "*",
"@aws-sdk/client-cloudwatch-logs": "^3.121.0",
"@aws-sdk/client-dynamodb": "^3.121.0",
"@aws-sdk/client-ecs": "^3.121.0",
"@aws-sdk/client-lambda": "^3.121.0",
"@aws-sdk/client-s3": "^3.121.0",
"@aws-sdk/client-sqs": "^3.121.0",
"@ln-maf/core": "^2.0.1",
"chai": "^4.3.6",
"luxon": "^2.4.0"
},
"peerDependencies": {
"@ln-maf/core": "*",
"@cucumber/cucumber": ">= 7.0.0"
"@cucumber/cucumber": ">= 7.0.0",
"@ln-maf/core": "*"
},
"devDependencies": {
"@ln-maf/core": "*",
"@ln-maf/validations": "*",
"@cucumber/cucumber": "8.2.0",
"nyc": "^15.1.0",
"@ln-maf/core": "*",
"@ln-maf/validations": "^2.0.1",
"eslint": "^8.18.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"multiple-cucumber-html-reporter": "^1.21.0"
"multiple-cucumber-html-reporter": "^1.21.0",
"nyc": "^15.1.0"
},
"gitHead": "9bf55a2c86fa17707fabfb4320c3d722e270f9e6"
}
2 changes: 1 addition & 1 deletion packages/aws/stepDefinitions/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ MAFWhen('file exists with name {string} at path {string} in bucket {string}', as
* Puts an object on s3 bucket User must have WRITE permissions on a bucket to add an object to it
*/
MAFWhen('{jsonObject} is uploaded to bucket {string} as key {string}', async function (file, bucketName, key) {
file = performJSONObjectTransform.call(this.results, file)
file = performJSONObjectTransform.call(this, file)
bucketName = filltemplate(bucketName, this.results)
key = filltemplate(key, this.results).replace(/\/{2,}/g, '/')
const queryParameters = {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "2.0.0",
"version": "2.0.1",
"description": "The core for the MAF framework. Contains helpers to make it easier to use.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -35,11 +35,11 @@
"homepage": "https://github.com/hpcc-systems/MAF#readme",
"devDependencies": {
"@cucumber/cucumber": "8.2.0",
"nyc": "^15.1.0",
"eslint": "^8.18.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0"
"eslint-plugin-promise": "^6.0.0",
"nyc": "^15.1.0"
}
}
12 changes: 6 additions & 6 deletions packages/defaultSQL/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "2.0.0",
"version": "2.0.1",
"description": "Default Sql setup on Node with cucumber",
"main": "index.js",
"scripts": {
Expand All @@ -17,21 +17,21 @@
"prompt": "^1.2.2"
},
"peerDependencies": {
"@ln-maf/core": "*",
"@cucumber/cucumber": ">= 7.0.0",
"@ln-maf/core": "*",
"keytar": "7.*"
},
"devDependencies": {
"@cucumber/cucumber": "8.2.0",
"@ln-maf/core": "*",
"@ln-maf/validations": "*",
"nyc": "^15.1.0",
"@ln-maf/core": "^2.0.1",
"@ln-maf/validations": "^2.0.1",
"eslint": "^8.18.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"multiple-cucumber-html-reporter": "^1.21.0"
"multiple-cucumber-html-reporter": "^1.21.0",
"nyc": "^15.1.0"
},
"gitHead": "9bf55a2c86fa17707fabfb4320c3d722e270f9e6",
"repository": {
Expand Down
14 changes: 7 additions & 7 deletions packages/mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "2.0.0",
"version": "2.0.1",
"description": "Setup for sql on Node",
"main": "index.js",
"scripts": {
Expand All @@ -15,24 +15,24 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@ln-maf/default-sql": "*",
"@ln-maf/default-sql": "^2.0.1",
"keytar": "^7.9.0",
"mysql2": "^2.3.3"
},
"peerDependencies": {
"@ln-maf/core": "*",
"@cucumber/cucumber": ">= 7.0.0"
"@cucumber/cucumber": ">= 7.0.0",
"@ln-maf/core": "*"
},
"devDependencies": {
"@ln-maf/core": "*",
"@cucumber/cucumber": "8.2.0",
"nyc": "^15.1.0",
"@ln-maf/core": "^2.0.1",
"eslint": "^8.18.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"multiple-cucumber-html-reporter": "^1.21.0"
"multiple-cucumber-html-reporter": "^1.21.0",
"nyc": "^15.1.0"
},
"gitHead": "2a575448a74cfaee5ec68fa10db24cf4ccade849",
"repository": {
Expand Down
14 changes: 7 additions & 7 deletions packages/preprocessor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "2.0.0",
"version": "2.0.1",
"description": "This project will preprocess feature files to allow more input variables to be supplied. This can be supplied through javascript, a csv/psv/json array file or a mixture of these. This will hopefully allow it to be easier to maintain larger test sets.",
"main": "index.js",
"bin": {
Expand All @@ -26,20 +26,20 @@
"typescript": "^4.6.3"
},
"peerDependencies": {
"@ln-maf/core": "*",
"@cucumber/cucumber": ">= 7.0.0"
"@cucumber/cucumber": ">= 7.0.0",
"@ln-maf/core": "*"
},
"devDependencies": {
"@cucumber/cucumber": "8.2.0",
"@ln-maf/validations": "*",
"@ln-maf/core": "*",
"nyc": "^15.1.0",
"@ln-maf/core": "^2.0.1",
"@ln-maf/validations": "^2.0.1",
"eslint": "^8.18.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"multiple-cucumber-html-reporter": "^1.21.0"
"multiple-cucumber-html-reporter": "^1.21.0",
"nyc": "^15.1.0"
},
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions packages/validations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "2.0.0",
"version": "2.0.1",
"description": "",
"main": "index.js",
"scripts": {
Expand All @@ -26,15 +26,15 @@
"@ln-maf/core": "*"
},
"devDependencies": {
"@ln-maf/core": "*",
"@cucumber/cucumber": "8.2.0",
"nyc": "^15.1.0",
"@ln-maf/core": "^2.0.1",
"eslint": "^8.18.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"multiple-cucumber-html-reporter": "^1.21.0"
"multiple-cucumber-html-reporter": "^1.21.0",
"nyc": "^15.1.0"
},
"gitHead": "9bf55a2c86fa17707fabfb4320c3d722e270f9e6",
"repository": {
Expand Down

0 comments on commit 6358fba

Please sign in to comment.