get.porter.sh/porter@v1.3.0/tests/integration/cli_test.go (about)

     1  //go:build integration
     2  
     3  package integration
     4  
     5  import (
     6  	"strings"
     7  	"testing"
     8  
     9  	"get.porter.sh/porter/tests/tester"
    10  	"github.com/stretchr/testify/require"
    11  )
    12  
    13  // Test that the CLI is configured properly.
    14  func TestCLI(t *testing.T) {
    15  	t.Skip("Turning off until we come back and stop logging errors in main")
    16  
    17  	test, err := tester.NewTest(t)
    18  	defer test.Close()
    19  	require.NoError(t, err, "test setup failed")
    20  
    21  	// When the command fails, only print the error message once
    22  	_, output, _ := test.RunPorter("explain", "-r=ghcr.io/getporter/missing-bundle")
    23  	gotErrors := strings.Count(output, "unable to pull bundle")
    24  	require.Equal(t, 1, gotErrors)
    25  }