github.com/tilt-dev/tilt@v0.36.0/integration/env_test.go (about)

     1  //go:build integration
     2  // +build integration
     3  
     4  package integration
     5  
     6  import (
     7  	"bytes"
     8  	"testing"
     9  
    10  	"github.com/stretchr/testify/assert"
    11  )
    12  
    13  // The Docker CLI library loads all env variables on it.
    14  // So the only way to really test if we're loading them properly
    15  // is to run tilt.
    16  func TestEnvInit(t *testing.T) {
    17  	t.Setenv("DOCKER_TLS_VERIFY", "1")
    18  	t.Setenv("DOCKER_CERT_PATH", "/tmp/unused-path")
    19  
    20  	f := newK8sFixture(t, "oneup")
    21  	out := &bytes.Buffer{}
    22  	err := f.tilt.CI(f.ctx, out)
    23  	assert.Error(t, err)
    24  	assert.Contains(t, out.String(), "unable to resolve docker endpoint: open /tmp/unused-path/ca.pem")
    25  }