mirror of https://github.com/hashicorp/consul
Fix other test
parent
cfec746d8b
commit
8a9db4cffc
|
@ -72,15 +72,12 @@ func Test_GetPolicyIDFromPartial_Builtins(t *testing.T) {
|
||||||
client := a.Client()
|
client := a.Client()
|
||||||
client.AddHeader("X-Consul-Token", "root")
|
client.AddHeader("X-Consul-Token", "root")
|
||||||
|
|
||||||
t.Run("global management policy", func(t *testing.T) {
|
for _, policy := range structs.ACLBuiltinPolicies {
|
||||||
id, err := GetPolicyIDFromPartial(client, structs.ACLPolicyGlobalManagementName)
|
name := fmt.Sprintf("%s policy", policy.Name)
|
||||||
|
t.Run(name, func(t *testing.T) {
|
||||||
|
id, err := GetPolicyIDFromPartial(client, policy.Name)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, structs.ACLPolicyGlobalManagementID, id)
|
require.Equal(t, policy.ID, id)
|
||||||
})
|
|
||||||
|
|
||||||
t.Run("global read-only policy", func(t *testing.T) {
|
|
||||||
id, err := GetPolicyIDFromPartial(client, structs.ACLPolicyGlobalReadOnlyName)
|
|
||||||
require.NoError(t, err)
|
|
||||||
require.Equal(t, structs.ACLPolicyGlobalReadOnlyID, id)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue