-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dxoakes
committed
Oct 27, 2017
1 parent
fa7ba6f
commit 43237e8
Showing
9 changed files
with
196 additions
and
5 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
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,5 @@ | ||
{ | ||
"name": "com.centurylink.mdw.demo.test", | ||
"schemaVersion": "6.0", | ||
"version": "0.0.06" | ||
} |
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,6 @@ | ||
BugWorkflow.test=1 | ||
BugWorkflow.yaml=1 | ||
createBugRequest.json=1 | ||
localhost.env=1 Renamed from e:\workspaces\dons\mdw-demo\assets\com\centurylink\mdw\demo\test\localhost.values | ||
localhost.values=1 | ||
mdw-demo.postman=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,36 @@ | ||
// directly test Create Bug and A Bug's Life | ||
start process('com.centurylink.mdw.demo.bugs/Create Bug') { | ||
variables = [ | ||
request: asset('createBugRequest.json').text, | ||
requestHeaders: """{\"content-type\": \"application/json\", | ||
\"mdw-request-id\": \"$masterRequestId\"}""" | ||
] | ||
} | ||
|
||
sleep 5 | ||
|
||
def bugTask = action task('${bug.title}') { | ||
outcome = 'Claim' | ||
} | ||
|
||
sleep 5 | ||
|
||
// submit a PUT request emulating commitId entry in custom page | ||
def response = submit request('mdw-demo.postman/PUT:bugs/{id}') { | ||
values = ['id': bugTask.id, 'commit-id': 'fa7ba6f'] | ||
} | ||
assert response.time < 1000 // less than a second | ||
assert response.status.code == 200 | ||
assert response.headers['content-type'] == 'application/json' | ||
|
||
// resolve the bug by completing its task | ||
action task('${bug.title}') { | ||
outcome = 'Resolve' | ||
} | ||
|
||
// wait for the subflow to complete | ||
wait process('com.centurylink.mdw.demo.bugs/A Bug\'s Life') | ||
|
||
// validate the runtime results of both processes | ||
verify processes('com.centurylink.mdw.demo.bugs/Create Bug', | ||
'com.centurylink.mdw.demo.bugs/A Bug\'s Life') |
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,54 @@ | ||
process: # 10009 | ||
name: Create Bug | ||
instance: 1 | ||
activity: # 1 "2017-10-27 11:03:30" | ||
name: Start | ||
status: Completed | ||
activity: # 3 "2017-10-27 11:03:30" | ||
name: | | ||
Validate | ||
Request | ||
status: Completed | ||
result: accepted | ||
activity: # 5 "2017-10-27 11:03:30" | ||
name: Save Bug | ||
status: Completed | ||
activity: # 6 "2017-10-27 11:03:30" | ||
name: | | ||
Invoke Bug | ||
Workflow | ||
status: Completed | ||
activity: # 2 "2017-10-27 11:03:30" | ||
name: Created | ||
status: Completed | ||
variable: # 10021 | ||
name: request | ||
value: | | ||
{ | ||
"description": "This is a sev 1 showstopper", | ||
"severity": 1, | ||
"title": "Don's car needs washing" | ||
} | ||
variable: # 10022 | ||
name: requestHeaders | ||
value: | | ||
{ | ||
"content-type": "application/json", | ||
"mdw-request-id": "dxoakes-171027-110326738" | ||
} | ||
variable: # 10023 | ||
name: response | ||
value: | | ||
{ | ||
"description": "This is a sev 1 showstopper", | ||
"id": 10003, | ||
"severity": 1, | ||
"title": "Don's car needs washing" | ||
} | ||
variable: # 10024 | ||
name: responseHeaders | ||
value: | | ||
{ | ||
"HttpStatusCode": "201", | ||
"Location": "http://localhost:8080/mdw/demo/api/bugs/10003" | ||
} |
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,8 @@ | ||
{ | ||
"_type": "com.centurylink.mdw.demo.bugs.Bug", | ||
"bug": { | ||
"title": "Don's car needs washing", | ||
"severity": 1, | ||
"description": "This is a sev 1 showstopper" | ||
} | ||
} |
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 @@ | ||
{ | ||
"base-url": "http://localhost:8080/mdw/services" | ||
} |
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,82 @@ | ||
{ | ||
"variables": [], | ||
"info": { | ||
"name": "mdw-demo", | ||
"_postman_id": "14050b74-5b83-34a6-06ac-710716e67e94", | ||
"description": "", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "bugs", | ||
"request": { | ||
"url": "{{base-url}}/demo/api/bugs", | ||
"method": "POST", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json", | ||
"description": "" | ||
} | ||
], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\r\n \"title\": \"Missing documentation on package-level handlers\",\r\n \"description\": \"Someone needs to step up. I'm not saying who...\",\r\n \"severity\": 2\r\n}" | ||
}, | ||
"description": "" | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "bugs/{id}", | ||
"request": { | ||
"url": "{{base-url}}/demo/api/bugs/{{id}}", | ||
"method": "PUT", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json", | ||
"description": "" | ||
} | ||
], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"title\": \"Missing documentation on package-level handlers\",\n \"description\": \"Someone needs to step up. I'm not saying who...\",\n \"severity\": 2,\n \"commitId\": {{commit-id}}\n}" | ||
}, | ||
"description": "" | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "bugs/{id}", | ||
"request": { | ||
"url": "{{base-url}}/demo/api/bugs/{{id}}", | ||
"method": "GET", | ||
"header": [], | ||
"body": {}, | ||
"description": "" | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "rules", | ||
"request": { | ||
"url": "{{base-url}}/Rules/demo.api/Playlist", | ||
"method": "POST", | ||
"header": [ | ||
{ | ||
"key": "Content-Type", | ||
"value": "application/json", | ||
"description": "" | ||
} | ||
], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\r\n \"name\": \"Don Oakes\",\r\n \"yearOfBirth\": 1962,\r\n \"genre\": \"punk\"\r\n}" | ||
}, | ||
"description": "" | ||
}, | ||
"response": [] | ||
} | ||
] | ||
} |