Use correct namespace in unit tests that use fake clientset

Fake clientset no longer needs to be prepopulated with records: keeping
them in leads to the name conflict on creates. Also, since fake
clientset now respects namespaces, we need to correctly populate them.
This commit is contained in:
Oleg Shaldybin
2016-06-01 18:47:36 -07:00
parent d445d4082d
commit 3b15d5be19
8 changed files with 47 additions and 19 deletions

View File

@@ -578,6 +578,9 @@ func TestDescribeEvents(t *testing.T) {
events := &api.EventList{
Items: []api.Event{
{
ObjectMeta: api.ObjectMeta{
Namespace: "foo",
},
Source: api.EventSource{Component: "kubelet"},
Message: "Item 1",
FirstTimestamp: unversioned.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)),