diff --git a/pkg/signatory/signatory_test.go b/pkg/signatory/signatory_test.go index 681bb467..68494e5e 100644 --- a/pkg/signatory/signatory_test.go +++ b/pkg/signatory/signatory_test.go @@ -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"),