api: remove the test for TestAPI_RulesTranslate_Raw

The API endpoint was removed in a previous commit, so we can no longer test this deprecated method.
pull/11232/head
Daniel Nephin 3 years ago
parent b4e3367e63
commit dc58a8c339

@ -1,7 +1,6 @@
package api package api
import ( import (
"strings"
"testing" "testing"
"time" "time"
@ -629,73 +628,3 @@ SxTJANJHqf4BiFtVjN7LZXi3HUIRAsceEbd0TfW5be9SQ0tbDyyGYt/bXtBLGTIh
} }
return return
} }
func TestAPI_RulesTranslate_Raw(t *testing.T) {
t.Parallel()
c, s := makeACLClient(t)
defer s.Stop()
acl := c.ACL()
input := `#start of policy
agent "" {
policy = "read"
}
node "" {
policy = "read"
}
service "" {
policy = "read"
}
key "" {
policy = "read"
}
session "" {
policy = "read"
}
event "" {
policy = "read"
}
query "" {
policy = "read"
}`
expected := `#start of policy
agent_prefix "" {
policy = "read"
}
node_prefix "" {
policy = "read"
}
service_prefix "" {
policy = "read"
}
key_prefix "" {
policy = "read"
}
session_prefix "" {
policy = "read"
}
event_prefix "" {
policy = "read"
}
query_prefix "" {
policy = "read"
}`
rules, err := acl.RulesTranslate(strings.NewReader(input))
require.NoError(t, err)
require.Equal(t, expected, rules)
}

Loading…
Cancel
Save