mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
fix rest unit test, tests in engine are left
This commit is contained in:
parent
32e28075c1
commit
b4f24371c3
2 changed files with 4 additions and 4 deletions
|
@ -69,7 +69,7 @@ func TestCRUDResource(t *testing.T) {
|
|||
t.Errorf("GetResource not working: %s", err)
|
||||
}
|
||||
// List Resources
|
||||
_, err = f.client.ListResource("thekinds", "ns-foo")
|
||||
_, err = f.client.ListResource("thekinds", "ns-foo", nil)
|
||||
if err != nil {
|
||||
t.Errorf("ListResource not working: %s", err)
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ func TestGenerateResource(t *testing.T) {
|
|||
gen := policytypes.Generation{Kind: "TheKind",
|
||||
Name: "gen-kind",
|
||||
Clone: &policytypes.CloneFrom{Namespace: "ns-foo", Name: "name-foo"}}
|
||||
err = f.client.GenerateResource(gen, ns.GetName())
|
||||
err = f.client.GenerateResource(gen, ns.GetName(), false)
|
||||
if err != nil {
|
||||
t.Errorf("GenerateResource not working: %s", err)
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ func TestGenerateResource(t *testing.T) {
|
|||
gen = policytypes.Generation{Kind: "TheKind",
|
||||
Name: "name2-baz-new",
|
||||
Data: newUnstructured("group2/version", "TheKind", "ns1", "name2-baz-new")}
|
||||
err = f.client.GenerateResource(gen, ns.GetName())
|
||||
err = f.client.GenerateResource(gen, ns.GetName(), false)
|
||||
if err != nil {
|
||||
t.Errorf("GenerateResource not working: %s", err)
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
func TestPositive(t *testing.T) {
|
||||
resourceName := "test_resource"
|
||||
expectedMsg := fmt.Sprintf("Policy applied successfully on the resource %s", resourceName)
|
||||
expectedMsg := fmt.Sprintf("Policy applied successfully on the resource '%s'", resourceName)
|
||||
msg, err := getEventMsg(SPolicyApply, resourceName)
|
||||
assert.NilError(t, err)
|
||||
assert.Equal(t, expectedMsg, msg)
|
||||
|
|
Loading…
Add table
Reference in a new issue