vendor: update git url handling with changes to buildkit
The git ssh url parsing API changed a bit and broke how buildx utilized the API. This updates the affected method with the new method of identifying an SSH url. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
13
vendor/github.com/moby/buildkit/util/testutil/integration/sandbox.go
generated
vendored
13
vendor/github.com/moby/buildkit/util/testutil/integration/sandbox.go
generated
vendored
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"github.com/google/shlex"
|
||||
"github.com/moby/buildkit/util/bklog"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const buildkitdConfigFile = "buildkitd.toml"
|
||||
@@ -126,7 +127,7 @@ func newSandbox(ctx context.Context, w Worker, mirror string, mv matrixValue) (s
|
||||
}
|
||||
|
||||
func RootlessSupported(uid int) bool {
|
||||
cmd := exec.Command("sudo", "-E", "-u", fmt.Sprintf("#%d", uid), "-i", "--", "exec", "unshare", "-U", "true") //nolint:gosec // test utility
|
||||
cmd := exec.Command("sudo", "-u", fmt.Sprintf("#%d", uid), "-i", "--", "exec", "unshare", "-U", "true") //nolint:gosec // test utility
|
||||
b, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
bklog.L.Warnf("rootless mode is not supported on this host: %v (%s)", err, string(b))
|
||||
@@ -156,6 +157,13 @@ func FormatLogs(m map[string]*bytes.Buffer) string {
|
||||
}
|
||||
|
||||
func CheckFeatureCompat(t *testing.T, sb Sandbox, features map[string]struct{}, reason ...string) {
|
||||
t.Helper()
|
||||
if err := HasFeatureCompat(t, sb, features, reason...); err != nil {
|
||||
t.Skipf(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func HasFeatureCompat(t *testing.T, sb Sandbox, features map[string]struct{}, reason ...string) error {
|
||||
t.Helper()
|
||||
if len(reason) == 0 {
|
||||
t.Fatal("no reason provided")
|
||||
@@ -172,6 +180,7 @@ func CheckFeatureCompat(t *testing.T, sb Sandbox, features map[string]struct{},
|
||||
}
|
||||
}
|
||||
if len(ereasons) > 0 {
|
||||
t.Skipf("%s worker can not currently run this test due to missing features (%s)", sb.Name(), strings.Join(ereasons, ", "))
|
||||
return errors.Errorf("%s worker can not currently run this test due to missing features (%s)", sb.Name(), strings.Join(ereasons, ", "))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user