-
Notifications
You must be signed in to change notification settings - Fork 4
Stateful Behavior cannot be reset #37
Description
According to: http://wiremock.org/docs/stateful-behaviour/ we should be able to reset state if stateful is used.
However when requesting:
http://localhost:4502/stubs/__admin/scenarios/reset I get No stub defined for this request
http://localhost:4502/__admin/scenarios/reset I get 404 Resource at '/__admin/scenarios/reset' not found: No resource found
Stateful scenario like this seems to work except reset of course:
{
"mappings": [
{
"scenarioName": "Authentication",
"requiredScenarioState": "Started",
"request": {
"method": "POST",
"url": "/sso/authenticate"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"bodyFileName": "myProj/authenticate.json"
}
},
{
"scenarioName": "Authentication",
"requiredScenarioState": "Started",
"newScenarioState": "All Accounts Closed",
"request": {
"method": "GET",
"url": "/sso/authenticate/allAccountsClosed"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"bodyFileName": "myProj/authenticate.json"
}
},
{
"scenarioName": "Authentication",
"requiredScenarioState": "All Accounts Closed",
"request": {
"method": "POST",
"url": "/sso/authenticate"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"bodyFileName": "myProj/authenticate-allAccountsClosed.json"
}
}
]
}