Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Commit

Permalink
Fix EXPERIMENTAL=on tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
  • Loading branch information
ulyssessouza committed Mar 7, 2019
1 parent 2810a38 commit f5ee4ef
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func testRenderApp(appPath string, env ...string) func(*testing.T) {
}
result := icmd.RunCmd(icmd.Cmd{
Command: args,
Env: env,
Env: append(os.Environ(), env...),
}).Assert(t, icmd.Success)
assert.Assert(t, is.Equal(readFile(t, filepath.Join(appPath, "expected.txt")), result.Stdout()), "rendering mismatch")
}
Expand Down
7 changes: 6 additions & 1 deletion e2e/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ func TestInvokePluginFromCLI(t *testing.T) {
// docker app --help prints docker-app help
cmd.Command = dockerCli.Command("app", "--help")
usage := icmd.RunCmd(cmd).Assert(t, icmd.Success).Combined()
golden.Assert(t, usage, "plugin-usage.golden")

goldenFile := "plugin-usage.golden"
if hasExperimental {
goldenFile = "plugin-usage-experimental.golden"
}
golden.Assert(t, usage, goldenFile)

// docker info should print app version and short description
cmd.Command = dockerCli.Command("info")
Expand Down
23 changes: 23 additions & 0 deletions e2e/testdata/plugin-usage-experimental.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

Usage: docker app COMMAND

Build and deploy Docker Application Packages.

Commands:
bundle Create a CNAB invocation image and bundle.json for the application.
completion Generates completion scripts for the specified shell (bash or zsh)
init Start building a Docker application
inspect Shows metadata, parameters and a summary of the compose file for a given application
install Install an application
merge Merge a multi-file application into a single file
pull Pull an application from a registry
push Push the application to a registry
render Render the Compose file for the application
split Split a single-file application into multiple files
status Get the installation status. If the installation is a docker application, the status shows the stack services.
uninstall Uninstall an application
upgrade Upgrade an installed application
validate Checks the rendered application is syntactically correct
version Print version information

Run 'docker app COMMAND --help' for more information on a command.

0 comments on commit f5ee4ef

Please sign in to comment.