This repository has been archived by the owner on Feb 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(e2e): delete test device after run
- Loading branch information
1 parent
6058b87
commit 6e839bc
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
@Last | ||
Feature: Delete the Cat Tracker | ||
|
||
This deletes the test device | ||
|
||
Background: | ||
|
||
Given I am authenticated with AWS key "{env__AWS_ACCESS_KEY_ID}" and secret "{env__AWS_SECRET_ACCESS_KEY}" | ||
|
||
Scenario: Delete the cat | ||
|
||
When I execute "listThingPrincipals" of the AWS Iot SDK with | ||
""" | ||
{ | ||
"thingName": "{env__JOB_ID}" | ||
} | ||
""" | ||
Then "$count(awsSdk.res.principals)" should equal 1 | ||
Given I store "awsSdk.res.principals[0]" into "certificateArn" | ||
Given I store "$split(awsSdk.res.principals[0], '/')[1]" into "certificateId" | ||
Given I execute "detachThingPrincipal" of the AWS Iot SDK with | ||
""" | ||
{ | ||
"thingName": "{env__JOB_ID}", | ||
"principal": "{certificateArn}" | ||
} | ||
""" | ||
And I execute "updateCertificate" of the AWS Iot SDK with | ||
""" | ||
{ | ||
"certificateId": "{certificateId}", | ||
"newStatus": "INACTIVE" | ||
} | ||
""" | ||
And I execute "deleteCertificate" of the AWS Iot SDK with | ||
""" | ||
{ | ||
"certificateId": "{certificateId}" | ||
} | ||
""" | ||
And I execute "deleteThing" of the AWS Iot SDK with | ||
""" | ||
{ | ||
"thingName": "{env__JOB_ID}" | ||
} | ||
""" |