@@ -1865,12 +1865,12 @@ func generateAndCopySupportBundle(t *testing.T, tc *cluster.Output) {
18651865 if stdout , stderr , err := RunCommandOnNode (t , tc , 0 , line ); err != nil {
18661866 t .Logf ("stdout: %s" , stdout )
18671867 t .Logf ("stderr: %s" , stderr )
1868- t .Errorf ("fail to generate cluster support from node %s bundle: %v" , node , err )
1869- }
1870-
1871- t . Logf ( "%s: copying cluster support bundle from node %s to local machine" , time . Now (). Format ( time . RFC3339 ), node )
1872- if err := cluster . CopyFileFromNode ( node , "/root/cluster.tar.gz" , " support- bundle-cluster.tar.gz" ); err != nil {
1873- t . Errorf ( "fail to copy cluster support bundle from node %s to local machine: %v" , node , err )
1868+ t .Logf ("fail to generate cluster support from node %s bundle: %v" , node , err )
1869+ } else {
1870+ t . Logf ( "%s: copying cluster support bundle from node %s to local machine" , time . Now (). Format ( time . RFC3339 ), node )
1871+ if err := cluster . CopyFileFromNode ( node , "/root/cluster.tar.gz" , "support-bundle-cluster.tar.gz" ); err != nil {
1872+ t . Logf ( "fail to copy cluster support bundle from node %s to local machine: %v" , node , err )
1873+ }
18741874 }
18751875
18761876 for i , node := range tc .Nodes {
@@ -1879,12 +1879,13 @@ func generateAndCopySupportBundle(t *testing.T, tc *cluster.Output) {
18791879 if stdout , stderr , err := RunCommandOnNode (t , tc , i , line ); err != nil {
18801880 t .Logf ("stdout: %s" , stdout )
18811881 t .Logf ("stderr: %s" , stderr )
1882- t .Errorf ("fail to generate support from node %s bundle: %v" , node , err )
1882+ t .Logf ("fail to generate support from node %s bundle: %v" , node , err )
1883+ continue
18831884 }
18841885
18851886 t .Logf ("%s: copying host support bundle from node %s to local machine" , time .Now ().Format (time .RFC3339 ), node )
18861887 if err := cluster .CopyFileFromNode (node , "/root/host.tar.gz" , fmt .Sprintf ("support-bundle-host-%s.tar.gz" , node )); err != nil {
1887- t .Errorf ("fail to copy host support bundle from node %s to local machine: %v" , node , err )
1888+ t .Logf ("fail to copy host support bundle from node %s to local machine: %v" , node , err )
18881889 }
18891890 }
18901891}
@@ -1894,29 +1895,27 @@ func copyPlaywrightReport(t *testing.T, tc *cluster.Output) {
18941895 if tc .Proxy != "" {
18951896 t .Logf ("%s: compressing playwright report on proxy node" , time .Now ().Format (time .RFC3339 ))
18961897 if _ , _ , err := RunCommandOnProxyNode (t , tc , line ); err != nil {
1897- t .Errorf ("fail to compress playwright report on node %s: %v" , tc .Proxy , err )
1898+ t .Logf ("fail to compress playwright report on node %s: %v" , tc .Proxy , err )
18981899 return
18991900 }
19001901 t .Logf ("%s: copying playwright report to local machine" , time .Now ().Format (time .RFC3339 ))
19011902 if err := cluster .CopyFileFromNode (tc .Proxy , "/root/playwright-report.tar.gz" , "playwright-report.tar.gz" ); err != nil {
1902- t .Errorf ("fail to copy playwright report to local machine: %v" , err )
1903+ t .Logf ("fail to copy playwright report to local machine: %v" , err )
19031904 }
19041905 } else {
19051906 t .Logf ("%s: compressing playwright report on node 0" , time .Now ().Format (time .RFC3339 ))
19061907 if _ , _ , err := RunCommandOnNode (t , tc , 0 , line ); err != nil {
1907- t .Errorf ("fail to compress playwright report on node %s: %v" , tc .Nodes [0 ], err )
1908+ t .Logf ("fail to compress playwright report on node %s: %v" , tc .Nodes [0 ], err )
19081909 return
19091910 }
19101911 t .Logf ("%s: copying playwright report to local machine" , time .Now ().Format (time .RFC3339 ))
19111912 if err := cluster .CopyFileFromNode (tc .Nodes [0 ], "/root/playwright-report.tar.gz" , "playwright-report.tar.gz" ); err != nil {
1912- t .Errorf ("fail to copy playwright report to local machine: %v" , err )
1913+ t .Logf ("fail to copy playwright report to local machine: %v" , err )
19131914 }
19141915 }
19151916}
19161917
19171918func cleanupCluster (t * testing.T , tc * cluster.Output ) {
1918- if t .Failed () {
1919- generateAndCopySupportBundle (t , tc )
1920- copyPlaywrightReport (t , tc )
1921- }
1919+ generateAndCopySupportBundle (t , tc )
1920+ copyPlaywrightReport (t , tc )
19221921}
0 commit comments