Skip to content

Instantly share code, notes, and snippets.

@meteorfox
Created June 1, 2015 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meteorfox/5ccb8ae26139d2678e23 to your computer and use it in GitHub Desktop.
Save meteorfox/5ccb8ae26139d2678e23 to your computer and use it in GitHub Desktop.
val deleteSubnets = scenario("Delete")
.exec(session => { session.set("networkURL", NETWORK_URL).set("authToken", "")})
.exec(Subnets.list.check(jsonPath("$.subnets[*].id").findAll.saveAs(":subnets/ids")))
.foreach(":subnets/ids", ":subnet/id") {
doIf(session => { session("subnetID").as[String].startsWith("TEST_")}) { exec(Subnets.delete) }}
.pause(30 seconds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment