Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestIsKubernetes (0.08 sec)

  1. cmd/update_test.go

    	}
    	os.Unsetenv("MESOS_CONTAINER_NAME")
    	dcos = IsDCOS()
    	if dcos {
    		t.Fatalf("Expected %t, got %t", false, dcos)
    	}
    }
    
    // Tests if the environment we are running is in kubernetes.
    func TestIsKubernetes(t *testing.T) {
    	t.Setenv("KUBERNETES_SERVICE_HOST", "10.11.148.5")
    	kubernetes := IsKubernetes()
    	if !kubernetes {
    		t.Fatalf("Expected %t, got %t", true, kubernetes)
    	}
    	os.Unsetenv("KUBERNETES_SERVICE_HOST")
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top