0.0.9 • Published 2 years ago
@field123/hacksprint-2022-js-sdk-test-response-generation v0.0.9
@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
Key | CLI opt | Default | Description |
---|---|---|---|
s | --source \<file> | required | Source postman collection json file. |
e | --env \<file> | required | Source postman environment json file. |
o | --output \<dir> | \<dir> | Output location for the generated endpoint json files. |
v | --verbose | false | Logs details of terraform commands to console. |
help | -h, --help | n/a | display 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