Skip to content

Commit e9c2a02

Browse files
authored
Set network namespace deletion propagation in e2e test (#981)
1 parent f9fa42c commit e9c2a02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/e2e/network_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ func (n *NetworkTests) WaitForNamespace(t *testing.T) {
8282
}
8383

8484
func (n *NetworkTests) DeleteNamespace(t *testing.T) {
85-
err := n.Kubernetes.ClientSet.CoreV1().Namespaces().Delete(context.Background(), n.Namespace, meta_v1.DeleteOptions{})
85+
deletePolicy := meta_v1.DeletePropagationForeground
86+
deleteOptions := meta_v1.DeleteOptions{
87+
PropagationPolicy: &deletePolicy,
88+
}
89+
err := n.Kubernetes.ClientSet.CoreV1().Namespaces().Delete(context.Background(), n.Namespace, deleteOptions)
8690
require.NoError(t, err, "There should be no error while deleting a namespace")
8791
}
8892

0 commit comments

Comments
 (0)