Skip to content

Commit

Permalink
chore: add attestation to allowed operations for some tests (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
GImbrailo authored Oct 17, 2024
1 parent a283606 commit 09ab433
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pkg/signatory/signatory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ func TestPolicy(t *testing.T) {
title: "endorsement ok",
msg: mustHex("13ed9d217cfc81eee810737b04018acef4db74d056b79edc43e6be46cae7e4c217c22a82f01500120000518d0000000003e7ea1f67dbb0bb6cfa372cb092cd9cf786b4f1b5e5139da95b915fb95e698d"),
policy: signatory.PublicKeyPolicy{
AllowedRequests: []string{"generic", "block", "endorsement"},
AllowedOps: []string{"endorsement", "seed_nonce_revelation", "activate_account", "ballot", "reveal", "transaction", "origination", "delegation"},
LogPayloads: true,
},
},
{
title: "endorsement not allowed",
msg: mustHex("13ed9d217cfc81eee810737b04018acef4db74d056b79edc43e6be46cae7e4c217c22a82f01500120000518d0000000003e7ea1f67dbb0bb6cfa372cb092cd9cf786b4f1b5e5139da95b915fb95e698d"),
policy: signatory.PublicKeyPolicy{
AllowedRequests: []string{"generic", "block"},
AllowedRequests: []string{"generic", "block", "endorsement", "attestation"},
AllowedOps: []string{"endorsement", "seed_nonce_revelation", "activate_account", "ballot", "reveal", "transaction", "origination", "delegation"},
LogPayloads: true,
},
expected: "request kind `endorsement' is not allowed",
},
// {
// title: "endorsement not allowed",
// msg: mustHex("13ed9d217cfc81eee810737b04018acef4db74d056b79edc43e6be46cae7e4c217c22a82f01500120000518d0000000003e7ea1f67dbb0bb6cfa372cb092cd9cf786b4f1b5e5139da95b915fb95e698d"),
// policy: signatory.PublicKeyPolicy{
// AllowedRequests: []string{"generic", "block"},
// AllowedOps: []string{"seed_nonce_revelation", "activate_account", "ballot", "reveal", "transaction", "origination", "delegation", "update_consensus_key"},
// LogPayloads: true,
// },
// expected: "request kind `endorsement' is not allowed",
// },
{
title: "generic ok",
msg: mustHex("03a60703a9567bf69ec66b368c3d8562eba4cbf29278c2c10447a684e3aa1436856c00a0c7a9b0bcd6a48ee0c13094327f215ba2adeaa7d40dabc1af25e36fde02c096b10201f525eabd8b0eeace1494233ea0230d2c9ad6619b00ffff0b66756c66696c6c5f61736b0000000907070088f0f6010306"),
Expand Down

0 comments on commit 09ab433

Please sign in to comment.