0.0.9 • Published 2 years ago

@field123/hacksprint-2022-js-sdk-test-response-generation v0.0.9

Weekly downloads
-
License
-
Repository
gitlab
Last release
2 years ago

@field123/hacksprint-2022-js-sdk-test-response-generation

Test Data Retrival Script

The script populates a store with test data, runs CURL calls to get data then tears down the data to create a clean slate.

Utilizes the EPCC Terraform Provider to populate and tear down down data in a store.

Setup

Create a .env file based on the .env.example file.

Install

yarn add -D @field123/hacksprint-2022-js-sdk-test-response-generation

Usage

npx hacksprint-2022-js-sdk-test-response-generation endpoints -s <source> -o <dest> -e <environment-file>
npx hacksprint-2022-js-sdk-test-response-generation endpoints  -s ./postman-export/postman_collection.json -o ./output -e ./postman-export/postman_environment.json
npx hacksprint-2022-js-sdk-test-response-generation endpoints  -s ./postman-export/postman_collection.json -o ./output -e ./postman-export/postman_environment.json -v
KeyCLI optDefaultDescription
s--source \<file>requiredSource postman collection json file.
e--env \<file>requiredSource postman environment json file.
o--output \<dir>\<dir>Output location for the generated endpoint json files.
v--verbosefalseLogs details of terraform commands to console.
help-h, --helpn/adisplay help for command

Sources

main.tf comes from this repo: https://gitlab.elasticpath.com/commerce-cloud/playground/sample-catalogs-accelerator/-/blob/MT-11900/store-scope/variants/get-started-with-pcm-catalog/main.tf