From dc58a8c3398c65fa5b35aaa738e9deab4596eed2 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 5 Oct 2021 18:56:27 -0400 Subject: [PATCH] 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. --- api/acl_test.go | 71 ------------------------------------------------- 1 file changed, 71 deletions(-) diff --git a/api/acl_test.go b/api/acl_test.go index d33f63c505..c4749f23ea 100644 --- a/api/acl_test.go +++ b/api/acl_test.go @@ -1,7 +1,6 @@ package api import ( - "strings" "testing" "time" @@ -629,73 +628,3 @@ SxTJANJHqf4BiFtVjN7LZXi3HUIRAsceEbd0TfW5be9SQ0tbDyyGYt/bXtBLGTIh } 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) -}