mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-19 01:47:43 +08:00
test: add test for building with alias "buildx b"
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
048ef1fbf8
commit
2e7e7abe42
@ -43,6 +43,7 @@ func buildCmd(sb integration.Sandbox, opts ...cmdOpt) (string, error) {
|
|||||||
|
|
||||||
var buildTests = []func(t *testing.T, sb integration.Sandbox){
|
var buildTests = []func(t *testing.T, sb integration.Sandbox){
|
||||||
testBuild,
|
testBuild,
|
||||||
|
testBuildAlias,
|
||||||
testBuildStdin,
|
testBuildStdin,
|
||||||
testBuildRemote,
|
testBuildRemote,
|
||||||
testBuildLocalState,
|
testBuildLocalState,
|
||||||
@ -81,6 +82,13 @@ func testBuild(t *testing.T, sb integration.Sandbox) {
|
|||||||
require.NoError(t, err, string(out))
|
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) {
|
func testBuildStdin(t *testing.T, sb integration.Sandbox) {
|
||||||
dockerfile := []byte(`
|
dockerfile := []byte(`
|
||||||
FROM busybox:latest AS base
|
FROM busybox:latest AS base
|
||||||
|
Loading…
x
Reference in New Issue
Block a user