get.porter.sh/porter@v1.3.0/pkg/porter/invoke_test.go (about) 1 package porter 2 3 import ( 4 "context" 5 "testing" 6 7 "github.com/stretchr/testify/assert" 8 "github.com/stretchr/testify/require" 9 ) 10 11 func TestInvokeOptions_Validate_ActionRequired(t *testing.T) { 12 p := NewTestPorter(t) 13 defer p.Close() 14 15 opts := NewInvokeOptions() 16 17 err := opts.Validate(context.Background(), nil, p.Porter) 18 19 require.Error(t, err) 20 assert.Contains(t, err.Error(), "--action is required") 21 }