INNER CODE UNIT · Go
TestIsPodActive
jtblin/kube2iam · namespace_test.go:145
func TestIsPodActive(t *testing.T) {
tests := []struct {
name string
pod *v1.Pod
expected bool
}{
{
name: "running with IP is active",
pod: &v1.Pod{Status: v1.PodStatus{
PodIP: "10.0.0.1",
Phase: v1.PodRunning,
}},
expected: true,
},
{
name: "pending with IP is active",
pod: &v1.Pod{Status: v1.PodStatus{
PodIP: "10.0.0.2",