From 704d5335f9e599f5b57a2e98d73d3a3af6c89aba Mon Sep 17 00:00:00 2001 From: Oleksandr Deundiak Date: Tue, 22 Aug 2023 17:35:52 +0200 Subject: [PATCH] test(rust): update bats tests --- .../rust/ockam/ockam_command/tests/bats/authority.bats | 4 ++-- .../rust/ockam/ockam_command/tests/bats/credentials.bats | 6 +++--- .../rust/ockam/ockam_command/tests/bats/unit.bats | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/implementations/rust/ockam/ockam_command/tests/bats/authority.bats b/implementations/rust/ockam/ockam_command/tests/bats/authority.bats index aa665d3511e..d67c83b2ba8 100644 --- a/implementations/rust/ockam/ockam_command/tests/bats/authority.bats +++ b/implementations/rust/ockam/ockam_command/tests/bats/authority.bats @@ -40,7 +40,7 @@ teardown() { echo "{\"id\": \"1\", \"name\" : \"default\", - \"identity\" : \"P6c20e814b56579306f55c64e8747e6c1b4a53d9a3f4ca83c252cc2fbfc72fa94\", + \"identity\" : \"I6c20e814b56579306f55c64e8747e6c1b4a53d9a\", \"access_route\" : \"/dnsaddr/127.0.0.1/tcp/4000/service/api\", \"authority_access_route\" : \"/dnsaddr/127.0.0.1/tcp/$port/service/api\", \"authority_identity\" : \"$authority_identity_full\"}" >"$PROJECT_JSON_PATH" @@ -91,7 +91,7 @@ teardown() { echo "{\"id\": \"1\", \"name\" : \"default\", - \"identity\" : \"P6c20e814b56579306f55c64e8747e6c1b4a53d9a3f4ca83c252cc2fbfc72fa94\", + \"identity\" : \"I6c20e814b56579306f55c64e8747e6c1b4a53d9a\", \"access_route\" : \"/dnsaddr/127.0.0.1/tcp/4000/service/api\", \"authority_access_route\" : \"/dnsaddr/127.0.0.1/tcp/$port/service/api\", \"authority_identity\" : \"$authority_identity_full\"}" >"$PROJECT_JSON_PATH" diff --git a/implementations/rust/ockam/ockam_command/tests/bats/credentials.bats b/implementations/rust/ockam/ockam_command/tests/bats/credentials.bats index 84ca5529aa7..58f5a88e336 100644 --- a/implementations/rust/ockam/ockam_command/tests/bats/credentials.bats +++ b/implementations/rust/ockam/ockam_command/tests/bats/credentials.bats @@ -36,12 +36,12 @@ teardown() { run "$OCKAM" credential show smart_nyc_cred assert_success assert_output --partial "Credential: smart_nyc_cred" - assert_output --partial "Attributes: {\"application\": \"Smart Factory\", \"city\": \"New York\"" + assert_output --partial "{\"application\": \"Smart Factory\", \"city\": \"New York\"" run "$OCKAM" credential list assert_success assert_output --partial "Credential: smart_nyc_cred" - assert_output --partial "Attributes: {\"application\": \"Smart Factory\", \"city\": \"New York\"" + assert_output --partial "{\"application\": \"Smart Factory\", \"city\": \"New York\"" } @test "credential - verify and store reject invalid credentials" { @@ -50,7 +50,7 @@ teardown() { idt1=$($OCKAM identity show i1 --full --encoding hex) # create an invalid credential - echo "FOOBAR" >"$OCKAM_HOME/bad_credential" + echo "aabbcc" >"$OCKAM_HOME/bad_credential" run "$OCKAM" credential verify --issuer "$idt1" --credential-path "$OCKAM_HOME/bad_credential" assert_success diff --git a/implementations/rust/ockam/ockam_command/tests/bats/unit.bats b/implementations/rust/ockam/ockam_command/tests/bats/unit.bats index 06790b90d1b..22b47806254 100644 --- a/implementations/rust/ockam/ockam_command/tests/bats/unit.bats +++ b/implementations/rust/ockam/ockam_command/tests/bats/unit.bats @@ -148,9 +148,9 @@ teardown() { run "$OCKAM" identity show "${i}" --full assert_success - assert_output --partial "Change History" - assert_output --partial "identifier" - assert_output --partial "signatures" + assert_output --partial "Change[0]:" + assert_output --partial "Identifier: " + assert_output --partial "primary_public_key: " } @test "identity - CRUD" {