-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test(shared): e2e test fix, add role to connection data class * test(shared): e2e test fix, use valid ServiceType * test(shared): e2e test fix, check for role in step * test(shared): e2e test fix, use different schema names for each schema created * test(shared): e2e test change, expect 422 results for bad properties * test(shared): e2e test change, support PRISM DID Issuer flow * chore(shared): remove unused containers, stop always running db, apisix * test(shared): fix indentation according to gherkin-lint * test(shared): fix indentation in docker-compose * test(shared): skip failing test until fixed
- Loading branch information
davidpoltorak-io
authored
Feb 21, 2023
1 parent
06cf7cf
commit 2f60f22
Showing
15 changed files
with
151 additions
and
131 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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
version: '3.8' | ||
--- | ||
version: "3.8" | ||
|
||
services: | ||
|
||
########################## | ||
# Database | ||
########################## | ||
db: | ||
image: postgres:13 | ||
restart: always | ||
environment: | ||
POSTGRES_MULTIPLE_DATABASES: "castor,pollux,connect,iris,agent,node_db" | ||
POSTGRES_USER: postgres | ||
|
@@ -27,9 +26,9 @@ services: | |
environment: | ||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]} | ||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} | ||
PGADMIN_CONFIG_SERVER_MODE: 'False' | ||
PGADMIN_CONFIG_SERVER_MODE: "False" | ||
volumes: | ||
- pgadmin:/var/lib/pgadmin | ||
- pgadmin:/var/lib/pgadmin | ||
ports: | ||
- "${PGADMIN_PORT:-5050}:80" | ||
depends_on: | ||
|
@@ -41,22 +40,6 @@ services: | |
########################## | ||
# Services | ||
########################## | ||
mediator: | ||
image: ghcr.io/input-output-hk/mercury-mediator:${MERCURY_MEDIATOR_VERSION} | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
|
||
iris: | ||
image: ghcr.io/input-output-hk/iris-service:${IRIS_SERVICE_VERSION} | ||
environment: | ||
IRIS_DB_HOST: db | ||
IRIS_DB_PORT: 5432 | ||
IRIS_DB_NAME: iris | ||
IRIS_DB_USER: postgres | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
|
||
prism-node: | ||
image: ghcr.io/input-output-hk/prism-node:${PRISM_NODE_VERSION} | ||
|
@@ -100,7 +83,7 @@ services: | |
prism-node: | ||
condition: service_started | ||
healthcheck: | ||
test: [ "CMD", "curl", "-f", "http://prism-agent:8080/connections" ] | ||
test: ["CMD", "curl", "-f", "http://prism-agent:8080/connections"] | ||
interval: 30s | ||
timeout: 10s | ||
retries: 5 | ||
|
@@ -111,20 +94,18 @@ services: | |
image: swaggerapi/swagger-ui:v4.14.0 | ||
environment: | ||
- 'URLS=[ | ||
{ name: "Prism Agent", url: "/prism-agent/api/openapi-spec.yaml" }, | ||
{ name: "Mediator", url: "/mediator/api/openapi-spec.yaml" } | ||
{ name: "Prism Agent", url: "/prism-agent/api/openapi-spec.yaml" }, | ||
{ name: "Mediator", url: "/mediator/api/openapi-spec.yaml" } | ||
]' | ||
|
||
apisix: | ||
image: apache/apisix:2.15.0-alpine | ||
restart: always | ||
volumes: | ||
- ./apisix/conf/apisix.yaml:/usr/local/apisix/conf/apisix.yaml:ro | ||
- ./apisix/conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro | ||
ports: | ||
- "${PORT}:9080/tcp" | ||
depends_on: | ||
- mediator | ||
- prism-agent | ||
- swagger-ui | ||
|
||
|
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
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
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
18 changes: 9 additions & 9 deletions
18
tests/e2e-tests/src/test/resources/features/connection/connection.feature
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
@RFC0160 @AIP10 | ||
Feature: Agents connection | ||
|
||
Scenario: Establish a connection between two agents | ||
When Acme generates a connection invitation to Bob | ||
And Bob receives the connection invitation from Acme | ||
And Bob sends a connection request to Acme | ||
And Acme receives the connection request | ||
And Acme sends a connection response to Bob | ||
And Bob receives the connection response | ||
# And Bob sends <message> to Acme | ||
Then Acme and Bob have a connection | ||
Scenario: Establish a connection between two agents | ||
When Acme generates a connection invitation to Bob | ||
And Bob receives the connection invitation from Acme | ||
And Bob sends a connection request to Acme | ||
And Acme receives the connection request | ||
And Acme sends a connection response to Bob | ||
And Bob receives the connection response | ||
# And Bob sends <message> to Acme | ||
Then Acme and Bob have a connection |
63 changes: 33 additions & 30 deletions
63
tests/e2e-tests/src/test/resources/features/credential_schemas/credential_schemas.feature
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 |
---|---|---|
@@ -1,36 +1,39 @@ | ||
Feature: Credential schemas | ||
|
||
Scenario: Successful schema creation | ||
When Acme creates a new credential schema | ||
Then He sees new credential schema is available | ||
Scenario: Successful schema creation | ||
When Acme creates a new credential schema | ||
Then He sees new credential schema is available | ||
|
||
Scenario Outline: Multiple schema creation | ||
When Acme creates <schemas> new schemas | ||
Then He can access all of them one by one | ||
Examples: | ||
| schemas | | ||
| 4 | | ||
Scenario Outline: Multiple schema creation | ||
When Acme creates <schemas> new schemas | ||
Then He can access all of them one by one | ||
Examples: | ||
| schemas | | ||
| 4 | | ||
|
||
Scenario Outline: Wrong specified fields for schema generation requests should fail | ||
When Acme tries to create a new schema with <value> in field <field> | ||
Then He sees the request with status <status> | ||
Examples: | ||
| field | value | status | | ||
| id | -1 | 400 | | ||
| attributes | null | 400 | | ||
Scenario Outline: Wrong specified fields for schema generation requests should fail | ||
When Acme tries to create a new schema with <value> in field <field> | ||
Then He sees the request with status <status> | ||
Examples: | ||
| field | value | status | | ||
| id | -1 | 400 | | ||
| attributes | null | 400 | | ||
|
||
@skip @bug | ||
Scenario: Schema creation with identical id should fail | ||
When Acme creates a new schema with some id | ||
And Acme tries to create a new schema with identical id | ||
Then He sees the request failure with identical id error | ||
@skip | ||
Scenario: Schema creation with identical name should fail | ||
|
||
@skip @bug | ||
Scenario Outline: Wrong specified filter parameters for schema generation requests should fail | ||
When Acme tries to get schemas with <value> in parameter <parameter> | ||
Then He sees the request with status <status> | ||
Examples: | ||
| parameter | value | status | | ||
| limit | -1 | 400 | | ||
| offset | -1 | 400 | | ||
| offset | 1000000 | 400 | | ||
@skip @bug | ||
Scenario: Schema creation with identical id should fail | ||
When Acme creates a new schema with some id | ||
And Acme tries to create a new schema with identical id | ||
Then He sees the request failure with identical id error | ||
|
||
@skip @bug | ||
Scenario Outline: Using incorrect filter params should result in error | ||
When Acme tries to get schemas with <value> in parameter <parameter> | ||
Then He sees the request with status <status> | ||
Examples: | ||
| parameter | value | status | | ||
| limit | -1 | 400 | | ||
| offset | -1 | 400 | | ||
| offset | 1000000 | 400 | |
Oops, something went wrong.