Skip to content

CI: KubernetesNetworkPolicy performs deferred cleanup in test function #3900

@joestringer

Description

@joestringer

This call cleans up state as part of the test:

testCanConnect(kubectl, namespace, "client-cannot-connect", service, 80, false)

cilium/test/k8sT/Policies.go

Lines 1187 to 1191 in 4fd4e09

defer func() {
By(fmt.Sprintf("Cleaning up the pod %s", podName))
err := k.CoreV1().Pods(ns).Delete(pod.Name, nil)
ExpectWithOffset(2, err).NotTo(HaveOccurred(), "Pod %q should have been deleted", pod.Name)
}()

This is poor form, it prevents appropriate log gathering on failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug/CIThis is a bug in the testing code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions