github.com/mponton/terratest@v0.44.0/modules/k8s/minikube_test.go (about) 1 //go:build kubeall || kubernetes 2 // +build kubeall kubernetes 3 4 // NOTE: we have build tags to differentiate kubernetes tests from non-kubernetes tests. This is done because minikube 5 // is heavy and can interfere with docker related tests in terratest. Specifically, many of the tests start to fail with 6 // `connection refused` errors from `minikube`. To avoid overloading the system, we run the kubernetes tests and helm 7 // tests separately from the others. This may not be necessary if you have a sufficiently powerful machine. We 8 // recommend at least 4 cores and 16GB of RAM if you want to run all the tests together. 9 10 package k8s 11 12 import ( 13 "testing" 14 15 "github.com/stretchr/testify/assert" 16 ) 17 18 // Since we always run unit tests against minikube, we can only test if IsMinikubeE returns true. 19 func TestIsMinikube(t *testing.T) { 20 t.Parallel() 21 22 options := NewKubectlOptions("", "", "") 23 isMinikube, err := IsMinikubeE(t, options) 24 assert.NoError(t, err) 25 assert.True(t, isMinikube) 26 }