github.com/docker/app@v0.9.1-beta3.0.20210611140623-a48f773ab002/e2e/validate_test.go (about) 1 package e2e 2 3 import ( 4 "path" 5 "strings" 6 "testing" 7 8 "gotest.tools/assert" 9 10 "gotest.tools/icmd" 11 ) 12 13 func TestOrphanedParameter(t *testing.T) { 14 cmd, cleanup := dockerCli.createTestCmd() 15 defer cleanup() 16 p := path.Join("testdata", "invalid", "unused_parameter") 17 cmd.Command = dockerCli.Command("app", "validate", p) 18 out := icmd.RunCmd(cmd).Assert(t, icmd.Expected{ExitCode: 1}).Combined() 19 assert.Assert(t, strings.Contains(out, "unused.parameter is declared as parameter but not used by the compose file")) 20 }