mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +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:
		@@ -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.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user