Skip to content

Commit

Permalink
CASMHMS-5678: Another shot at glory
Browse files Browse the repository at this point in the history
  • Loading branch information
jwlv committed Jan 21, 2025
1 parent 5a5dacc commit 987ddf3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 217 deletions.
2 changes: 1 addition & 1 deletion cmd/smd/smd-api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ func TestDoComponentsGet(t *testing.T) {
Type: []string{"node"},
},
hmsds.FLTR_DEFAULT,
json.RawMessage(`{"type":"about:blank","title":"Not Found","detail":"allow GET,POST,DELETE","status":404}
json.RawMessage(`{}
`),
}, {
"GET",
Expand Down
224 changes: 8 additions & 216 deletions test/ct/api/3-disruptive/test_service_negative.tavern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,33 +105,7 @@ stages:
verify: !bool "{verify}"
json: {"fake":"payload"}
response:
status_code: 405
verify_response_with:
function: tavern.testutils.helpers:validate_pykwalify
extra_kwargs:
schema:
type: map
mapping:
type:
type: str
required: True
enum:
- "about:blank"
title:
type: str
required: True
enum:
- "Method Not Allowed"
detail:
type: str
required: True
enum:
- "allow GET"
status:
type: int
required: True
enum:
- 405
status_code: 404

# PATCH /service/liveness API response code
# PATCH /service/liveness API response body
Expand All @@ -142,33 +116,7 @@ stages:
verify: !bool "{verify}"
json: {"fake":"payload"}
response:
status_code: 405
verify_response_with:
function: tavern.testutils.helpers:validate_pykwalify
extra_kwargs:
schema:
type: map
mapping:
type:
type: str
required: True
enum:
- "about:blank"
title:
type: str
required: True
enum:
- "Method Not Allowed"
detail:
type: str
required: True
enum:
- "allow GET"
status:
type: int
required: True
enum:
- 405
status_code: 404

# PUT /service/liveness API response code
# PUT /service/liveness API response body
Expand All @@ -179,33 +127,7 @@ stages:
verify: !bool "{verify}"
json: {"fake":"payload"}
response:
status_code: 405
verify_response_with:
function: tavern.testutils.helpers:validate_pykwalify
extra_kwargs:
schema:
type: map
mapping:
type:
type: str
required: True
enum:
- "about:blank"
title:
type: str
required: True
enum:
- "Method Not Allowed"
detail:
type: str
required: True
enum:
- "allow GET"
status:
type: int
required: True
enum:
- 405
status_code: 404

# DELETE /service/liveness API response code
# DELETE /service/liveness API response body
Expand All @@ -215,33 +137,7 @@ stages:
method: DELETE
verify: !bool "{verify}"
response:
status_code: 405
verify_response_with:
function: tavern.testutils.helpers:validate_pykwalify
extra_kwargs:
schema:
type: map
mapping:
type:
type: str
required: True
enum:
- "about:blank"
title:
type: str
required: True
enum:
- "Method Not Allowed"
detail:
type: str
required: True
enum:
- "allow GET"
status:
type: int
required: True
enum:
- 405
status_code: 404

# POST /service/values API response code
# POST /service/values API response body
Expand All @@ -252,33 +148,7 @@ stages:
verify: !bool "{verify}"
json: {"fake":"payload"}
response:
status_code: 405
verify_response_with:
function: tavern.testutils.helpers:validate_pykwalify
extra_kwargs:
schema:
type: map
mapping:
type:
type: str
required: True
enum:
- "about:blank"
title:
type: str
required: True
enum:
- "Method Not Allowed"
detail:
type: str
required: True
enum:
- "allow GET"
status:
type: int
required: True
enum:
- 405
status_code: 404

# PATCH /service/values API response code
# PATCH /service/values API response body
Expand All @@ -289,33 +159,7 @@ stages:
verify: !bool "{verify}"
json: {"fake":"payload"}
response:
status_code: 405
verify_response_with:
function: tavern.testutils.helpers:validate_pykwalify
extra_kwargs:
schema:
type: map
mapping:
type:
type: str
required: True
enum:
- "about:blank"
title:
type: str
required: True
enum:
- "Method Not Allowed"
detail:
type: str
required: True
enum:
- "allow GET"
status:
type: int
required: True
enum:
- 405
status_code: 404

# PUT /service/values API response code
# PUT /service/values API response body
Expand All @@ -326,33 +170,7 @@ stages:
verify: !bool "{verify}"
json: {"fake":"payload"}
response:
status_code: 405
verify_response_with:
function: tavern.testutils.helpers:validate_pykwalify
extra_kwargs:
schema:
type: map
mapping:
type:
type: str
required: True
enum:
- "about:blank"
title:
type: str
required: True
enum:
- "Method Not Allowed"
detail:
type: str
required: True
enum:
- "allow GET"
status:
type: int
required: True
enum:
- 405
status_code: 404

# DELETE /service/values API response code
# DELETE /service/values API response body
Expand All @@ -362,30 +180,4 @@ stages:
method: DELETE
verify: !bool "{verify}"
response:
status_code: 405
verify_response_with:
function: tavern.testutils.helpers:validate_pykwalify
extra_kwargs:
schema:
type: map
mapping:
type:
type: str
required: True
enum:
- "about:blank"
title:
type: str
required: True
enum:
- "Method Not Allowed"
detail:
type: str
required: True
enum:
- "allow GET"
status:
type: int
required: True
enum:
- 405
status_code: 404

0 comments on commit 987ddf3

Please sign in to comment.