From 6d2214d670c54eb5e5fa88ec82b73d83eecc68a4 Mon Sep 17 00:00:00 2001 From: Prince Chaddha Date: Mon, 1 Nov 2021 17:52:18 +0530 Subject: [PATCH] matchers updated --- token-spray/api-adafruit-io.yaml | 5 +++-- .../{apigee-edge.yaml => api-apigee-edge.yaml} | 7 ++++--- token-spray/api-appveyor.yaml | 5 +++-- token-spray/{asana.yaml => api-asana.yaml} | 11 +++++++---- token-spray/api-binance.yaml | 8 ++++---- token-spray/{bingmaps.yaml => api-bingmaps.yaml} | 0 token-spray/{bitly.yaml => api-bitly.yaml} | 5 +++-- token-spray/{buildkite.yaml => api-buildkite.yaml} | 11 +++++++---- token-spray/{buttercms.yaml => api-buttercms.yaml} | 11 +++++++---- token-spray/{calendly.yaml => api-calendly.yaml} | 10 +++++++--- token-spray/{circleci.yaml => api-circleci.yaml} | 9 ++++++--- token-spray/api-cooperhewitt.yaml | 10 +++++++--- token-spray/{deviantart.yaml => api-deviantart.yaml} | 5 ++--- token-spray/api-europeana.yaml | 10 +++++++--- token-spray/api-leanix.yaml | 5 +++-- token-spray/api-strava.yaml | 5 +++-- token-spray/api-taiga.yaml | 5 +++-- token-spray/api-thecatapi.yaml | 10 ++++++---- token-spray/api-webex.yaml | 6 ++++-- 19 files changed, 86 insertions(+), 52 deletions(-) rename token-spray/{apigee-edge.yaml => api-apigee-edge.yaml} (87%) rename token-spray/{asana.yaml => api-asana.yaml} (71%) rename token-spray/{bingmaps.yaml => api-bingmaps.yaml} (100%) rename token-spray/{bitly.yaml => api-bitly.yaml} (83%) rename token-spray/{buildkite.yaml => api-buildkite.yaml} (70%) rename token-spray/{buttercms.yaml => api-buttercms.yaml} (69%) rename token-spray/{calendly.yaml => api-calendly.yaml} (71%) rename token-spray/{circleci.yaml => api-circleci.yaml} (71%) rename token-spray/{deviantart.yaml => api-deviantart.yaml} (88%) diff --git a/token-spray/api-adafruit-io.yaml b/token-spray/api-adafruit-io.yaml index c9eb638d7d..5fc0e8d40c 100644 --- a/token-spray/api-adafruit-io.yaml +++ b/token-spray/api-adafruit-io.yaml @@ -19,5 +19,6 @@ requests: - type: word part: body words: - - "error" - negative: true + - '"username":' + - '"id":' + condition: and \ No newline at end of file diff --git a/token-spray/apigee-edge.yaml b/token-spray/api-apigee-edge.yaml similarity index 87% rename from token-spray/apigee-edge.yaml rename to token-spray/api-apigee-edge.yaml index 52c95af31a..e724933ea0 100644 --- a/token-spray/apigee-edge.yaml +++ b/token-spray/api-apigee-edge.yaml @@ -3,8 +3,8 @@ id: api-apigee-edge info: name: Apigee Edge API Test author: dwisiswant0 - reference: https://apidocs.apigee.com/apis severity: info + reference: https://apidocs.apigee.com/apis tags: token-spray,apigee self-contained: true @@ -24,5 +24,6 @@ requests: - type: word part: body words: - - "fault" - negative: true + - '"uuid":' + - '"name":' + condition: and diff --git a/token-spray/api-appveyor.yaml b/token-spray/api-appveyor.yaml index e1b8ee023e..25bac0e370 100644 --- a/token-spray/api-appveyor.yaml +++ b/token-spray/api-appveyor.yaml @@ -20,5 +20,6 @@ requests: - type: word part: body words: - - "Authorization required" - negative: true + - '"roleId":' + - '"created":' + condition: and \ No newline at end of file diff --git a/token-spray/asana.yaml b/token-spray/api-asana.yaml similarity index 71% rename from token-spray/asana.yaml rename to token-spray/api-asana.yaml index 482dc7bdd9..9608f3c236 100644 --- a/token-spray/asana.yaml +++ b/token-spray/api-asana.yaml @@ -16,7 +16,10 @@ requests: Authorization: Bearer {{token}} matchers: - - type: status - negative: true - status: - - 401 + - type: word + part: body + words: + - 'data:' + - 'email' + - 'name' + condition: and diff --git a/token-spray/api-binance.yaml b/token-spray/api-binance.yaml index 064b6f6f1d..b2e24bbb78 100644 --- a/token-spray/api-binance.yaml +++ b/token-spray/api-binance.yaml @@ -19,7 +19,7 @@ requests: - type: word part: body words: - - "Invalid API-key" - - "key format invalid" - condition: or - negative: true + - '"id":' + - '"price":' + - '"quoteQty":' + condition: and \ No newline at end of file diff --git a/token-spray/bingmaps.yaml b/token-spray/api-bingmaps.yaml similarity index 100% rename from token-spray/bingmaps.yaml rename to token-spray/api-bingmaps.yaml diff --git a/token-spray/bitly.yaml b/token-spray/api-bitly.yaml similarity index 83% rename from token-spray/bitly.yaml rename to token-spray/api-bitly.yaml index 01c70c7974..0a4c307e15 100644 --- a/token-spray/bitly.yaml +++ b/token-spray/api-bitly.yaml @@ -16,6 +16,7 @@ requests: matchers: - type: word part: body - negative: true words: - - 'INVALID_ARG_ACCESS_TOKEN' + - '"long_url":' + - '"created_at":' + condition: and \ No newline at end of file diff --git a/token-spray/buildkite.yaml b/token-spray/api-buildkite.yaml similarity index 70% rename from token-spray/buildkite.yaml rename to token-spray/api-buildkite.yaml index 350b8edd1b..7855f0b53b 100644 --- a/token-spray/buildkite.yaml +++ b/token-spray/api-buildkite.yaml @@ -16,7 +16,10 @@ requests: Authorization: Bearer {{token}} matchers: - - type: status - status: - - 401 - negative: true + - type: word + part: body + words: + - '"id":' + - '"graphql_id":' + - '"email":' + condition: and \ No newline at end of file diff --git a/token-spray/buttercms.yaml b/token-spray/api-buttercms.yaml similarity index 69% rename from token-spray/buttercms.yaml rename to token-spray/api-buttercms.yaml index 15d86d53fe..21b6d1dff1 100644 --- a/token-spray/buttercms.yaml +++ b/token-spray/api-buttercms.yaml @@ -14,7 +14,10 @@ requests: - "https://api.buttercms.com/v2/posts/?auth_token={{token}}" matchers: - - type: status - status: - - 401 - negative: true + - type: word + part: body + words: + - '"meta":' + - '"data":' + - '"url":' + condition: and \ No newline at end of file diff --git a/token-spray/calendly.yaml b/token-spray/api-calendly.yaml similarity index 71% rename from token-spray/calendly.yaml rename to token-spray/api-calendly.yaml index b54a5c8df8..10a8e83478 100644 --- a/token-spray/calendly.yaml +++ b/token-spray/api-calendly.yaml @@ -16,6 +16,10 @@ requests: X-Token: "{{token}}" matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"data":' + - '"id":' + - '"email":' + condition: and \ No newline at end of file diff --git a/token-spray/circleci.yaml b/token-spray/api-circleci.yaml similarity index 71% rename from token-spray/circleci.yaml rename to token-spray/api-circleci.yaml index d519f10651..cfe7672786 100644 --- a/token-spray/circleci.yaml +++ b/token-spray/api-circleci.yaml @@ -14,6 +14,9 @@ requests: - "https://circleci.com/api/v1.1/me?circle-token={{token}}" matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"admin"' + - '"login"' + condition: and diff --git a/token-spray/api-cooperhewitt.yaml b/token-spray/api-cooperhewitt.yaml index 339f8ed1b2..a15d91a73e 100644 --- a/token-spray/api-cooperhewitt.yaml +++ b/token-spray/api-cooperhewitt.yaml @@ -14,6 +14,10 @@ requests: - "https://api.collection.cooperhewitt.org/rest/?method=api.spec.formats&access_token={{token}}" matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"stat":' + - '"formats":' + - '"default_format":' + condition: and diff --git a/token-spray/deviantart.yaml b/token-spray/api-deviantart.yaml similarity index 88% rename from token-spray/deviantart.yaml rename to token-spray/api-deviantart.yaml index ab73e7ea0d..b09e9acd2b 100644 --- a/token-spray/deviantart.yaml +++ b/token-spray/api-deviantart.yaml @@ -3,8 +3,8 @@ id: api-deviantart info: name: DeviantArt API Test author: zzeitlin - reference: https://www.deviantart.com/developers/authentication severity: info + reference: https://www.deviantart.com/developers/authentication tags: token-spray,deviantart self-contained: true @@ -18,5 +18,4 @@ requests: - type: word part: body words: - - '"status":"error"' - negative: true + - '"status" : "success"' diff --git a/token-spray/api-europeana.yaml b/token-spray/api-europeana.yaml index 69c55b1560..527bf6dd4c 100644 --- a/token-spray/api-europeana.yaml +++ b/token-spray/api-europeana.yaml @@ -14,6 +14,10 @@ requests: - "https://api.europeana.eu/record/v2/search.json?wskey={{token}}&query=*&rows=0&profile=facets" matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - 'success' + - 'apikey' + - 'action' + condition: and \ No newline at end of file diff --git a/token-spray/api-leanix.yaml b/token-spray/api-leanix.yaml index 53be0b6e95..172d00ec30 100644 --- a/token-spray/api-leanix.yaml +++ b/token-spray/api-leanix.yaml @@ -21,5 +21,6 @@ requests: - type: word part: body words: - - "Credentials are required" - negative: true + - '"input":' + - '"connectorType":' + condition: and \ No newline at end of file diff --git a/token-spray/api-strava.yaml b/token-spray/api-strava.yaml index b7ec7eb8b9..f81d4897ba 100644 --- a/token-spray/api-strava.yaml +++ b/token-spray/api-strava.yaml @@ -19,5 +19,6 @@ requests: - type: word part: body words: - - "Authorization Error" - negative: true + - '"id"' + - '"username"' + condition: and diff --git a/token-spray/api-taiga.yaml b/token-spray/api-taiga.yaml index b22fc01cf8..6e8748bdf1 100644 --- a/token-spray/api-taiga.yaml +++ b/token-spray/api-taiga.yaml @@ -19,5 +19,6 @@ requests: - type: word part: body words: - - "token_not_valid" - negative: true + - '"auth_code":' + - '"state":' + condition: and diff --git a/token-spray/api-thecatapi.yaml b/token-spray/api-thecatapi.yaml index f8399778d8..b5c7dab4ac 100644 --- a/token-spray/api-thecatapi.yaml +++ b/token-spray/api-thecatapi.yaml @@ -16,7 +16,9 @@ requests: x-api-key: "{{token}}" matchers: - - type: status - negative: true - status: - - 401 + - type: word + part: body + words: + - '"country_code":' + - '"created_at":' + condition: and diff --git a/token-spray/api-webex.yaml b/token-spray/api-webex.yaml index e8f60ed51b..c5e61ded0b 100644 --- a/token-spray/api-webex.yaml +++ b/token-spray/api-webex.yaml @@ -19,5 +19,7 @@ requests: - type: word part: body words: - - "errors" - negative: true + - 'id' + - 'title' + - 'type' + condition: and