Skip to content

Commit

Permalink
test: add test for building with alias "buildx b"
Browse files Browse the repository at this point in the history
Signed-off-by: David Karlsson <[email protected]>
  • Loading branch information
dvdksn committed Jul 3, 2024
1 parent 048ef1f commit 2e7e7ab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func buildCmd(sb integration.Sandbox, opts ...cmdOpt) (string, error) {

var buildTests = []func(t *testing.T, sb integration.Sandbox){
testBuild,
testBuildAlias,
testBuildStdin,
testBuildRemote,
testBuildLocalState,
Expand Down Expand Up @@ -81,6 +82,13 @@ func testBuild(t *testing.T, sb integration.Sandbox) {
require.NoError(t, err, string(out))
}

func testBuildAlias(t *testing.T, sb integration.Sandbox) {
dir := createTestProject(t)
cmd := buildxCmd(sb, withDir(dir), withArgs("b", dir))
out, err := cmd.CombinedOutput()
require.NoError(t, err, string(out))
}

func testBuildStdin(t *testing.T, sb integration.Sandbox) {
dockerfile := []byte(`
FROM busybox:latest AS base
Expand Down

0 comments on commit 2e7e7ab

Please sign in to comment.