Allow custom namespace creation in e2e framework

This commit is contained in:
Maciej Szulik
2016-02-08 14:25:14 +01:00
parent 5a3dec8dad
commit 7f61f62ec2
2 changed files with 12 additions and 2 deletions

View File

@@ -225,6 +225,10 @@ func (f *Framework) afterEach() {
}
func (f *Framework) CreateNamespace(baseName string, labels map[string]string) (*api.Namespace, error) {
createTestingNS := testContext.CreateTestingNS
if createTestingNS == nil {
createTestingNS = CreateTestingNS
}
ns, err := createTestingNS(baseName, f.Client, labels)
if err == nil {
f.namespacesToDelete = append(f.namespacesToDelete, ns)