mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Update storage/handler unit tests to set / expect namespace in object
This commit is contained in:
parent
92422a7305
commit
e731ccd650
@ -3505,6 +3505,7 @@ func TestNamedCreaterWithGenerateName(t *testing.T) {
|
||||
|
||||
itemOut.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
|
||||
simple.Name = populateName
|
||||
simple.Namespace = "default" // populated by create handler to match request URL
|
||||
if !reflect.DeepEqual(&itemOut, simple) {
|
||||
t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simple, string(body))
|
||||
}
|
||||
@ -3583,6 +3584,7 @@ func TestCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
itemOut.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
|
||||
simple.Namespace = "default" // populated by create handler to match request URL
|
||||
if !reflect.DeepEqual(&itemOut, simple) {
|
||||
t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simple, string(body))
|
||||
}
|
||||
@ -3644,6 +3646,7 @@ func TestCreateYAML(t *testing.T) {
|
||||
}
|
||||
|
||||
itemOut.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
|
||||
simple.Namespace = "default" // populated by create handler to match request URL
|
||||
if !reflect.DeepEqual(&itemOut, simple) {
|
||||
t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simple, string(body))
|
||||
}
|
||||
@ -3695,6 +3698,7 @@ func TestCreateInNamespace(t *testing.T) {
|
||||
}
|
||||
|
||||
itemOut.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{})
|
||||
simple.Namespace = "other" // populated by create handler to match request URL
|
||||
if !reflect.DeepEqual(&itemOut, simple) {
|
||||
t.Errorf("Unexpected data: %#v, expected %#v (%s)", itemOut, simple, string(body))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user