mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
run_remote.go: move registerGceHostIP() call to testImage()
I.e. don't assume that `testHost` is called on a GCE host. Prep for future patch.
This commit is contained in:
parent
36233b985b
commit
032dbd2063
@ -453,14 +453,6 @@ func registerGceHostIP(host string) error {
|
|||||||
|
|
||||||
// Run tests in archive against host
|
// Run tests in archive against host
|
||||||
func testHost(host string, deleteFiles bool, imageDesc, junitFileName, ginkgoFlagsStr string) *TestResult {
|
func testHost(host string, deleteFiles bool, imageDesc, junitFileName, ginkgoFlagsStr string) *TestResult {
|
||||||
if err := registerGceHostIP(host); err != nil {
|
|
||||||
return &TestResult{
|
|
||||||
err: err,
|
|
||||||
host: host,
|
|
||||||
exitOk: false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
path, err := arc.getArchive()
|
path, err := arc.getArchive()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Don't log fatal because we need to do any needed cleanup contained in "defer" statements
|
// Don't log fatal because we need to do any needed cleanup contained in "defer" statements
|
||||||
@ -555,6 +547,14 @@ func testImage(imageConfig *internalGCEImage, junitFileName string) *TestResult
|
|||||||
// If we are going to delete the instance, don't bother with cleaning up the files
|
// If we are going to delete the instance, don't bother with cleaning up the files
|
||||||
deleteFiles := !*deleteInstances && *cleanup
|
deleteFiles := !*deleteInstances && *cleanup
|
||||||
|
|
||||||
|
if err = registerGceHostIP(host); err != nil {
|
||||||
|
return &TestResult{
|
||||||
|
err: err,
|
||||||
|
host: host,
|
||||||
|
exitOk: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result := testHost(host, deleteFiles, imageConfig.imageDesc, junitFileName, ginkgoFlagsStr)
|
result := testHost(host, deleteFiles, imageConfig.imageDesc, junitFileName, ginkgoFlagsStr)
|
||||||
// This is a temporary solution to collect serial node serial log. Only port 1 contains useful information.
|
// This is a temporary solution to collect serial node serial log. Only port 1 contains useful information.
|
||||||
// TODO(random-liu): Extract out and unify log collection logic with cluste e2e.
|
// TODO(random-liu): Extract out and unify log collection logic with cluste e2e.
|
||||||
|
Loading…
Reference in New Issue
Block a user