mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #26437 from pwittrock/fix-26435
Automatic merge from submit-queue Node e2e - Fix issue where error in scp is not return. Fixes #26435 []()
This commit is contained in:
		@@ -166,21 +166,21 @@ func RunRemote(archive string, host string, cleanup bool, junitFileNumber int) (
 | 
			
		||||
		fmt.Sprintf("tar -xzvf ./%s", archiveName),
 | 
			
		||||
		fmt.Sprintf("timeout -k 30s %ds ./e2e_node.test --logtostderr --v 2 --build-services=false --stop-services=%t --node-name=%s --report-dir=%s/results --junit-file-number=%d %s", *testTimeoutSeconds, cleanup, host, tmp, junitFileNumber, *ginkgoFlags),
 | 
			
		||||
	)
 | 
			
		||||
	aggErr := []error{}
 | 
			
		||||
 | 
			
		||||
	glog.Infof("Starting tests on %s", host)
 | 
			
		||||
	output, err := RunSshCommand("ssh", host, "--", "sh", "-c", cmd)
 | 
			
		||||
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		aggErr = append(aggErr, err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	glog.Infof("Copying test artifacts from %s", host)
 | 
			
		||||
	scpErr := getTestArtifacts(host, tmp)
 | 
			
		||||
 | 
			
		||||
		// Return both the testing and scp error
 | 
			
		||||
	if scpErr != nil {
 | 
			
		||||
			return "", utilerrors.NewAggregate([]error{err, scpErr})
 | 
			
		||||
		}
 | 
			
		||||
		return "", err
 | 
			
		||||
		aggErr = append(aggErr, scpErr)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = getTestArtifacts(host, tmp)
 | 
			
		||||
	return output, nil
 | 
			
		||||
	return output, utilerrors.NewAggregate(aggErr)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func getTestArtifacts(host, testDir string) error {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user