-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #294 from smocker-dev/fix/persistence
Fix/persistence
- Loading branch information
Showing
7 changed files
with
85 additions
and
7 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 |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
build/ | ||
coverage/ | ||
node_modules/ | ||
sessions/ | ||
sessions | ||
!tests/sessions | ||
smocker | ||
smocker.test | ||
yarn-error.log |
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
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
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,32 @@ | ||
name: Persistance | ||
version: "2" | ||
testcases: | ||
- name: Check Mocks | ||
steps: | ||
- type: http | ||
method: GET | ||
url: http://localhost:8081/mocks | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
- result.bodyjson.__len__ ShouldEqual 1 | ||
- result.bodyjson.bodyjson0.state.id ShouldEqual YnJEM95SR | ||
- name: Check History | ||
steps: | ||
- type: http | ||
method: GET | ||
url: http://localhost:8081/history | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
- result.bodyjson.__len__ ShouldEqual 1 | ||
- result.bodyjson.bodyjson0.context.mock_id ShouldEqual YnJEM95SR | ||
- name: Check Sessions | ||
steps: | ||
- type: http | ||
method: GET | ||
url: http://localhost:8081/sessions | ||
assertions: | ||
- result.statuscode ShouldEqual 200 | ||
- result.bodyjson.__len__ ShouldEqual 1 | ||
- result.bodyjson.bodyjson0.id ShouldEqual 3giPMr5IR | ||
- result.bodyjson.bodyjson0.history.__len__ ShouldEqual 1 | ||
- result.bodyjson.bodyjson0.mocks.__len__ ShouldEqual 1 |
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,16 @@ | ||
- context: | ||
mockid: YnJEM95SR | ||
mocktype: static | ||
delay: "" | ||
request: | ||
path: /test | ||
method: GET | ||
date: 2024-01-22T21:06:00.547178247+01:00 | ||
response: | ||
status: 200 | ||
body: | ||
message: test | ||
headers: | ||
Content-Type: | ||
- application/json | ||
date: 2024-01-22T21:06:00.547400418+01:00 |
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,21 @@ | ||
- request: | ||
path: | ||
matcher: ShouldEqual | ||
value: /test | ||
method: | ||
matcher: ShouldEqual | ||
value: GET | ||
response: | ||
body: | | ||
{"message": "test"} | ||
status: 200 | ||
headers: | ||
Content-Type: | ||
- application/json | ||
context: | ||
times: 1 | ||
state: | ||
id: YnJEM95SR | ||
times_count: 0 | ||
locked: false | ||
creation_date: 2024-01-22T21:05:27.349554475+01:00 |
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,3 @@ | ||
- id: 3giPMr5IR | ||
name: 'Session #1' | ||
date: 2024-01-22T21:05:11.838034004+01:00 |