-
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: add events support in e2e tests (#592)
- Loading branch information
abalias
authored
Jul 14, 2023
1 parent
8d23500
commit 39be7a9
Showing
27 changed files
with
338 additions
and
236 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 |
---|---|---|
|
@@ -71,7 +71,7 @@ jobs: | |
- name: Start services for issuer | ||
env: | ||
PORT: 8080 | ||
NETWORK: prism | ||
WEBHOOK_URL: http://host.docker.internal:9955 | ||
uses: isbang/[email protected] | ||
with: | ||
compose-file: "./infrastructure/shared/docker-compose.yml" | ||
|
@@ -82,7 +82,7 @@ jobs: | |
- name: Start services for holder | ||
env: | ||
PORT: 8090 | ||
NETWORK: prism | ||
WEBHOOK_URL: http://host.docker.internal:9956 | ||
uses: isbang/[email protected] | ||
with: | ||
compose-file: "./infrastructure/shared/docker-compose.yml" | ||
|
@@ -93,6 +93,7 @@ jobs: | |
- name: Start services for verifier | ||
env: | ||
PORT: 8070 | ||
WEBHOOK_URL: http://host.docker.internal:9957 | ||
uses: isbang/[email protected] | ||
with: | ||
compose-file: "./infrastructure/shared/docker-compose.yml" | ||
|
@@ -121,15 +122,6 @@ jobs: | |
name: e2e-tests-result | ||
path: ${{ env.REPORTS_DIR }} | ||
|
||
- name: Publish e2e test Results | ||
if: always() | ||
id: publish-unit-tests | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
junit_files: "${{ env.REPORTS_DIR }}/SERENITY-JUNIT-*.xml" | ||
comment_title: "E2E Test Results" | ||
check_name: "E2E Test Results" | ||
|
||
- name: Extract test results | ||
id: analyze_test_results | ||
if: github.ref_name == 'main' | ||
|
@@ -162,6 +154,15 @@ jobs: | |
echo "ignored=${IGNORED_TESTS}"; | ||
} >> "$GITHUB_OUTPUT" | ||
- name: Publish e2e test Results | ||
if: github.ref_name == 'main' || steps.analyze_test_results.outputs.conclusion == 'failure' | ||
id: publish-unit-tests | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
junit_files: "${{ env.REPORTS_DIR }}/SERENITY-JUNIT-*.xml" | ||
comment_title: "E2E Test Results" | ||
check_name: "E2E Test Results" | ||
|
||
- name: Slack Notification | ||
if: github.ref_name == 'main' && steps.analyze_test_results.outputs.conclusion == 'failure' | ||
uses: rtCamp/action-slack-notify@v2 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package api_models | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlinx.serialization.json.JsonElement | ||
|
||
@Serializable | ||
data class Event ( | ||
var type: String, | ||
var id: String, | ||
var ts: String, | ||
var data: JsonElement, | ||
): JsonEncoded | ||
|
||
@Serializable | ||
data class ConnectionEvent ( | ||
var type: String, | ||
var id: String, | ||
var ts: String, | ||
var data: Connection, | ||
): JsonEncoded | ||
|
||
@Serializable | ||
data class CredentialEvent ( | ||
var type: String, | ||
var id: String, | ||
var ts: String, | ||
var data: Credential, | ||
): JsonEncoded | ||
|
||
@Serializable | ||
data class PresentationEvent ( | ||
var type: String, | ||
var id: String, | ||
var ts: String, | ||
var data: PresentationProof, | ||
): JsonEncoded | ||
|
||
@Serializable | ||
data class DidEvent ( | ||
var type: String, | ||
var id: String, | ||
var ts: String, | ||
var data: ManagedDid, | ||
): JsonEncoded |
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,8 +1,11 @@ | ||
package api_models | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class Invitation( | ||
var id: String = "", | ||
var from: String = "", | ||
var invitationUrl: String = "", | ||
var type: String = "", | ||
) | ||
): JsonEncoded |
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,12 @@ | ||
package api_models | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlinx.serialization.encodeToString | ||
import kotlinx.serialization.json.Json | ||
|
||
@Serializable | ||
sealed interface JsonEncoded { | ||
fun toJsonString(): String { | ||
return Json.encodeToString(this) | ||
} | ||
} |
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
11 changes: 10 additions & 1 deletion
11
tests/e2e-tests/src/main/kotlin/api_models/PresentationProof.kt
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,10 +1,19 @@ | ||
package api_models | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class PresentationProof( | ||
var presentationId: String? = null, | ||
var thid: String? = null, | ||
var status: String? = null, | ||
var connectionId: String? = null, | ||
var proofs: List<String>? = null, | ||
var data: List<String>? = null, | ||
) | ||
): JsonEncoded | ||
|
||
object PresentationProofStatus { | ||
const val REQUEST_RECEIVED = "RequestReceived" | ||
const val REQUEST_REJECTED = "RequestRejected" | ||
const val PRESENTATION_VERIFIED = "PresentationVerified" | ||
} |
Oops, something went wrong.