github.com/docker/app@v0.9.1-beta3.0.20210611140623-a48f773ab002/e2e/envfile_test.go (about) 1 package e2e 2 3 import ( 4 "path/filepath" 5 "testing" 6 7 "gotest.tools/icmd" 8 ) 9 10 func TestRenderWithEnvFile(t *testing.T) { 11 cmd, cleanup := dockerCli.createTestCmd() 12 defer cleanup() 13 appPath := filepath.Join("testdata", "envfile", "envfile.dockerapp") 14 15 cmd.Command = dockerCli.Command("app", "build", "-f", appPath, "--tag", "a-simple-tag", "--no-resolve-image", ".") 16 icmd.RunCmd(cmd).Assert(t, icmd.Success) 17 18 cmd.Command = dockerCli.Command("app", "image", "render", "a-simple-tag") 19 icmd.RunCmd(cmd).Assert(t, icmd.Expected{Out: `version: "3.7" 20 services: 21 db: 22 environment: 23 COMPANY: mycompany 24 SOME_FILE: /some/file 25 USER: myuser 26 image: busybox:1.30.1`}) 27 }