github.com/terraform-modules-krish/terratest@v0.29.0/modules/k8s/minikube_test.go (about)

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