Adding namespaces/finalizer subresource to federation apiserver

This commit is contained in:
nikhiljindal
2016-09-01 15:21:50 -07:00
parent 199338a551
commit 274487da87
3 changed files with 21 additions and 11 deletions

View File

@@ -283,8 +283,8 @@ func testCoreResourceList(t *testing.T) {
}
assert.Equal(t, "", apiResourceList.APIVersion)
assert.Equal(t, v1.SchemeGroupVersion.String(), apiResourceList.GroupVersion)
// Assert that there are exactly 6 resources.
assert.Equal(t, 6, len(apiResourceList.APIResources))
// Assert that there are exactly 7 resources.
assert.Equal(t, 7, len(apiResourceList.APIResources))
// Verify services.
found := findResource(apiResourceList.APIResources, "services")
@@ -301,6 +301,9 @@ func testCoreResourceList(t *testing.T) {
found = findResource(apiResourceList.APIResources, "namespaces/status")
assert.NotNil(t, found)
assert.False(t, found.Namespaced)
found = findResource(apiResourceList.APIResources, "namespaces/finalize")
assert.NotNil(t, found)
assert.False(t, found.Namespaced)
// Verify events.
found = findResource(apiResourceList.APIResources, "events")