diff --git a/scripts/smoke-deployment.sh b/scripts/smoke-deployment.sh index 4438487..05f8cb5 100755 --- a/scripts/smoke-deployment.sh +++ b/scripts/smoke-deployment.sh @@ -121,9 +121,19 @@ dotnet run --project "$PROJECT" --configuration "$BUILD_CONFIGURATION" --no-buil wait "$host_pid" host_pid='' -jq -e 'select(.event == "host.direct-traffic" and .status == "verified")' "$host_log" >/dev/null -jq -e 'select(.event == "host.deregistered" and .status == "complete")' "$host_log" >/dev/null -jq -e 'select(.event == "join.direct-traffic" and .status == "verified")' "$join_log" >/dev/null -jq -e 'select(.event == "join.outcome-report" and .status == "accepted")' "$join_log" >/dev/null +if ! jq -s -e ' + any(.[]; .event == "host.direct-traffic" and .status == "verified") + and any(.[]; .event == "host.deregistered" and .status == "complete") +' "$host_log" >/dev/null; then + printf 'Host diagnostic did not complete authenticated traffic and deregistration.\n' >&2 + exit 1 +fi +if ! jq -s -e ' + any(.[]; .event == "join.direct-traffic" and .status == "verified") + and any(.[]; .event == "join.outcome-report" and .status == "accepted") +' "$join_log" >/dev/null; then + printf 'Join diagnostic did not complete authenticated traffic and outcome reporting.\n' >&2 + exit 1 +fi printf 'Rendezvous deployment smoke passed: HTTP live/ready and authenticated UDP mediation/direct traffic.\n' diff --git a/tests/FinalFactory.Rendezvous.Tests/Documentation/DocumentationContractTests.cs b/tests/FinalFactory.Rendezvous.Tests/Documentation/DocumentationContractTests.cs index 360530e..072459e 100644 --- a/tests/FinalFactory.Rendezvous.Tests/Documentation/DocumentationContractTests.cs +++ b/tests/FinalFactory.Rendezvous.Tests/Documentation/DocumentationContractTests.cs @@ -63,6 +63,7 @@ public sealed partial class DocumentationContractTests Assert.Contains("mint-local-publisher-credential.sh", smoke, StringComparison.Ordinal); Assert.Contains("select(.event == \"host.ready\" and .status == \"ready\")", smoke, StringComparison.Ordinal); Assert.Contains("hasListingId", smoke, StringComparison.Ordinal); + Assert.Contains("jq -s -e", smoke, StringComparison.Ordinal); Assert.DoesNotContain("jq -c .", smoke, StringComparison.Ordinal); Assert.DoesNotContain("hexkey:", smoke, StringComparison.Ordinal); Assert.DoesNotContain("openssl dgst", smoke, StringComparison.Ordinal);