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

Opensearch postman #239

Merged
merged 2 commits into from
Oct 24, 2023
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
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ services:
- ${POSTMAN_COLLECTION_FILE}:/postman/postman-collection.json
networks:
- pds
command: "run /postman/postman-collection.json --env-var baseUrl=${REG_API_URL} --reporters cli,testrail"
command: "run /postman/postman-collection.json --insecure --env-var baseUrl=${REG_API_URL} --env-var opensearchUrl=${ES_URL} --reporters cli,testrail"

# Executes Registry API integration test as a Postman collection with test data (after waiting for data to be loaded)
reg-api-integration-test-with-wait:
Expand Down
101 changes: 52 additions & 49 deletions docker/postman/postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@
"",
"var resp = pm.response.json();",
"",
"pm.test(\"C2723037 file size value does have brackets\", () => {",
"pm.test(\"C2723037 file size value doesn't have brackets\", () => {",
" pm.expect(resp[\"pds:File.pds:file_size\"]).to.equal(\"1365\"); ",
"});",
"",
Expand Down Expand Up @@ -855,58 +855,61 @@
},
{
"name": "opensearch requests",
"event": [
"item": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"C2723010 legacy_registry index exists\", () => {",
" pm.response.to.have.status(200);",
"});",
"",
"var resp = pm.response.json();",
"",
"pm.test(\"C2723010 more than 10000 synchronized products\", () => {",
" pm.expect(resp.hits.total.value).to.eql(10000); ",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "admin",
"type": "string"
},
"name": "legacy_registry",
"event": [
{
"key": "username",
"value": "admin",
"type": "string"
"listen": "test",
"script": {
"exec": [
"pm.test(\"C2723010 legacy_registry index exists\", () => {",
" pm.response.to.have.status(200);",
"});",
"",
"var resp = pm.response.json();",
"",
"pm.test(\"C2723010 more than 10000 synchronized products\", () => {",
" pm.expect(resp.hits.total.value).to.eql(10000); ",
"});",
""
],
"type": "text/javascript"
}
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://localhost:9200/legacy_registry/_search",
"protocol": "https",
"host": [
"localhost"
],
"port": "9200",
"path": [
"legacy_registry",
"_search"
]
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "admin",
"type": "string"
},
{
"key": "username",
"value": "admin",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{opensearchUrl}}/legacy_registry/_search",
"host": [
"{{opensearchUrl}}"
],
"path": [
"legacy_registry",
"_search"
]
}
},
"response": []
}
},
"response": []
]
}
],
"event": [
Expand Down Expand Up @@ -937,4 +940,4 @@
"value": "http://registry-api:8080"
}
]
}
}
Loading