Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: getting started fixed with valid test #579

Merged
merged 1 commit into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 72 additions & 75 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,82 +27,79 @@ Fist let's create Postman collection:
```bash
cat <<EOF > my_postman_collection.json
{
"info": {
"_postman_id": "8af42c21-3e31-49c1-8b27-d6e60623a180",
"name": "Kubeshop",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Home",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Body matches string\", function () {",
" pm.expect(pm.response.text()).to.include(\"K8s Accelerator\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://kubeshop.io/",
"protocol": "https",
"host": [
"kubeshop",
"io"
],
"path": [
""
]
}
},
"response": []
},
{
"name": "Team",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Body matches string\", function () {",
" pm.expect(pm.response.text()).to.include(\"Jacek Wysocki\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://kubeshop.io/our-team",
"protocol": "https",
"host": [
"kubeshop",
"io"
],
"path": [
"our-team"
]
}
},
"response": []
}
]
"info": {
"_postman_id": "8af42c21-3e31-49c1-8b27-d6e60623a180",
"name": "Kubeshop",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Home",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Body matches string\", function () {",
" pm.expect(pm.response.text()).to.include(\"K8s Accelerator\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://kubeshop.io/",
"protocol": "https",
"host": [
"kubeshop",
"io"
],
"path": [
""
]
}
},
"response": []
},
{
"name": "Team",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://kubeshop.io/our-team",
"protocol": "https",
"host": [
"kubeshop",
"io"
],
"path": [
"our-team"
]
}
},
"response": []
}
]
}

EOF
```

Expand Down
73 changes: 73 additions & 0 deletions test/e2e/Kubeshop.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"info": {
"_postman_id": "8af42c21-3e31-49c1-8b27-d6e60623a180",
"name": "Kubeshop",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Home",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Body matches string\", function () {",
" pm.expect(pm.response.text()).to.include(\"K8s Accelerator\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://kubeshop.io/",
"protocol": "https",
"host": [
"kubeshop",
"io"
],
"path": [
""
]
}
},
"response": []
},
{
"name": "Team",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://kubeshop.io/our-team",
"protocol": "https",
"host": [
"kubeshop",
"io"
],
"path": [
"our-team"
]
}
},
"response": []
}
]
}