use a dynamic public_key

This commit is contained in:
Alfred Kamanda 2024-10-02 15:50:52 +03:00
parent 96ec3919b2
commit 986f3979fb
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703
2 changed files with 8 additions and 4 deletions

View File

@ -659,10 +659,14 @@ func TestMyAccount_MyAddress(t *testing.T) {
t.Errorf("Test case '%s' failed during Flush: %v", group.Name, err) t.Errorf("Test case '%s' failed during Flush: %v", group.Name, err)
} }
b := w.Bytes() b := w.Bytes()
if !bytes.Equal(b, []byte(step.ExpectedContent)) {
t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", step.ExpectedContent, b)
}
publicKey := extractPublicKey(b)
expectedContent := bytes.Replace([]byte(step.ExpectedContent), []byte("{public_key}"), []byte(publicKey), -1)
if !bytes.Equal(b, expectedContent) {
t.Fatalf("expected:\n\t%s\ngot:\n\t%s\n", expectedContent, b)
}
} }
} }
} }

View File

@ -583,7 +583,7 @@
}, },
{ {
"input": "6", "input": "6",
"expectedContent": "Address: 0xdF8CB1D9b5BDaE418E5Bee107031cA7d933906CD\n9:Quit" "expectedContent": "Address: {public_key}\n9:Quit"
}, },
{ {
"input": "9", "input": "9",