mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
Merge pull request #131 from scottslowe/postman-aws-api
Add sample JavaScript tests
This commit is contained in:
commit
4be8a216ff
5 changed files with 10 additions and 0 deletions
2
aws/postman-aws-api/describe-azs-test.js
Normal file
2
aws/postman-aws-api/describe-azs-test.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var jsonObject = xml2Json(pm.response.text());
|
||||
pm.environment.set("firstAz", jsonObject.DescribeAvailabilityZonesResponse.availabilityZoneInfo.item[0].zoneName);
|
||||
2
aws/postman-aws-api/describe-images-test.js
Normal file
2
aws/postman-aws-api/describe-images-test.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var jsonObject = xml2Json(pm.response.text());
|
||||
pm.environment.set("imageId", jsonObject.DescribeImagesResponse.imagesSet.item.imageId);
|
||||
2
aws/postman-aws-api/describe-key-pairs-test.js
Normal file
2
aws/postman-aws-api/describe-key-pairs-test.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var jsonObject = xml2Json(pm.response.text());
|
||||
pm.environment.set("sshKeyName", jsonObject.DescribeKeyPairsResponse.keySet.item[0].keyName);
|
||||
2
aws/postman-aws-api/describe-subnets-test.js
Normal file
2
aws/postman-aws-api/describe-subnets-test.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var jsonObject = xml2Json(pm.response.text());
|
||||
pm.environment.set("SubnetId", jsonObject.DescribeSubnetsResponse.subnetSet.item.subnetId);
|
||||
2
aws/postman-aws-api/describe-vpcs-test.js
Normal file
2
aws/postman-aws-api/describe-vpcs-test.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
var jsonObject = xml2Json(pm.response.text());
|
||||
pm.environment.set("defaultVpcId", jsonObject.DescribeVpcsResponse.vpcSet.item.vpcId);
|
||||
Loading…
Reference in a new issue