Merge pull request #25972 from luxas/remove_arch_constants
Automatic merge from submit-queue Use pause image depending on the server's platform when testing Removed all pause image constant strings, now the pause image is chosen by arch. Part of the effort of making e2e arch-agnostic. The pause image name and version is also now only in two places, and it's documented to bump both Also removed "amd64" constants in the code. Such constants should be replaced by `runtime.GOARCH` or by looking up the server platform Fixes: #22876 and #15140 Makes it easier for: #25730 Related: #17981 This is for `v1.3` @ixdy @thockin @vishh @kubernetes/sig-testing @andyzheng0831 @pensu
This commit is contained in:
@@ -1448,37 +1448,6 @@ func streamingUpload(file *os.File, fileName string, postBodyWriter *multipart.W
|
||||
}
|
||||
}
|
||||
|
||||
var binPrefixes = []string{
|
||||
"_output/dockerized/bin",
|
||||
"_output/local/bin",
|
||||
"platforms",
|
||||
}
|
||||
|
||||
// findBinary searches through likely paths to find the specified binary. It
|
||||
// takes the one that has been built most recently. Platform should be
|
||||
// specified as '<os>/<arch>'. For example: 'linux/amd64'.
|
||||
func findBinary(binName string, platform string) (string, error) {
|
||||
var binTime time.Time
|
||||
var binPath string
|
||||
|
||||
for _, pre := range binPrefixes {
|
||||
tryPath := path.Join(framework.TestContext.RepoRoot, pre, platform, binName)
|
||||
fi, err := os.Stat(tryPath)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
if fi.ModTime().After(binTime) {
|
||||
binPath = tryPath
|
||||
binTime = fi.ModTime()
|
||||
}
|
||||
}
|
||||
|
||||
if len(binPath) > 0 {
|
||||
return binPath, nil
|
||||
}
|
||||
return binPath, fmt.Errorf("Could not find %v for %v", binName, platform)
|
||||
}
|
||||
|
||||
func startLocalProxy() (srv *httptest.Server, logs *bytes.Buffer) {
|
||||
logs = &bytes.Buffer{}
|
||||
p := goproxy.NewProxyHttpServer()
|
||||
|
Reference in New Issue
Block a user