Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 90d8144

Browse files
committed
use 'build' in e2e test to replace 'bundle'
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 7c5b866 commit 90d8144

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

e2e/commands_test.go

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -149,32 +149,30 @@ maintainers:
149149
}
150150

151151
func TestInspectApp(t *testing.T) {
152-
cmd, cleanup := dockerCli.createTestCmd()
153-
defer cleanup()
154-
155-
// cwd = e2e
156-
dir := fs.NewDir(t, "detect-app-binary",
157-
fs.WithDir("attachments.dockerapp", fs.FromDir("testdata/attachments.dockerapp")))
158-
defer dir.Remove()
152+
runWithDindSwarmAndRegistry(t, func(info dindSwarmAndRegistryInfo) {
153+
cmd := info.configuredCmd
159154

160-
tmpDir := fs.NewDir(t, t.Name())
161-
defer tmpDir.Remove()
155+
// cwd = e2e
156+
dir := fs.NewDir(t, "detect-app-binary",
157+
fs.WithDir("attachments.dockerapp", fs.FromDir("testdata/attachments.dockerapp")))
158+
defer dir.Remove()
162159

163-
cmd.Command = dockerCli.Command("app", "inspect")
164-
cmd.Dir = dir.Path()
165-
icmd.RunCmd(cmd).Assert(t, icmd.Expected{
166-
ExitCode: 1,
167-
Err: "invalid reference format",
168-
})
160+
cmd.Command = dockerCli.Command("app", "inspect")
161+
cmd.Dir = dir.Path()
162+
icmd.RunCmd(cmd).Assert(t, icmd.Expected{
163+
ExitCode: 1,
164+
Err: "invalid reference format",
165+
})
169166

170-
cmd.Command = dockerCli.Command("app", "bundle", filepath.Join("testdata", "simple", "simple.dockerapp"), "--output", tmpDir.Join("simple-bundle.json"), "--tag", "simple-app:1.0.0")
171-
cmd.Dir = ""
172-
icmd.RunCmd(cmd).Assert(t, icmd.Success)
167+
cmd.Command = dockerCli.Command("app", "build", filepath.Join("testdata", "simple", "simple.dockerapp"), "simple-app:1.0.0")
168+
cmd.Dir = ""
169+
icmd.RunCmd(cmd).Assert(t, icmd.Success)
173170

174-
cmd.Command = dockerCli.Command("app", "inspect", "simple-app:1.0.0")
175-
cmd.Dir = dir.Path()
176-
output := icmd.RunCmd(cmd).Assert(t, icmd.Success).Combined()
177-
golden.Assert(t, output, "app-inspect.golden")
171+
cmd.Command = dockerCli.Command("app", "inspect", "simple-app:1.0.0")
172+
cmd.Dir = dir.Path()
173+
output := icmd.RunCmd(cmd).Assert(t, icmd.Success).Combined()
174+
golden.Assert(t, output, "app-inspect.golden")
175+
})
178176
}
179177

180178
func TestDockerAppLifecycle(t *testing.T) {

0 commit comments

Comments
 (0)