Skip to content

Commit bb5d230

Browse files
authored
test: make Windows log extraction best-effort in cleanup (#8433)
1 parent 7e09916 commit bb5d230

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

e2e/vmss.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ func extractLogsFromVMWindows(ctx context.Context, s *Scenario) {
867867
s.T.Logf("no VMSS instances found")
868868
return
869869
}
870+
870871
instanceID := *page.Value[0].InstanceID
871872
blobPrefix := s.Runtime.VMSSName
872873
blobUrl := config.Config.BlobStorageAccountURL() + "/" + config.Config.BlobContainer + "/" + blobPrefix
@@ -918,11 +919,17 @@ func extractLogsFromVMWindows(ctx context.Context, s *Scenario) {
918919
},
919920
nil,
920921
)
921-
require.NoError(s.T, err, "failed to initiate run command on VMSS instance %s", instanceID)
922+
if err != nil {
923+
s.T.Logf("failed to initiate run command on VMSS instance %s: %s", instanceID, err)
924+
return
925+
}
922926

923927
// Poll the result until the operation is completed
924928
runCommandResp, err := pollerResp.PollUntilDone(ctx, config.DefaultPollUntilDoneOptions)
925-
require.NoError(s.T, err, "failed to poll run command on VMSS instance %s", instanceID)
929+
if err != nil {
930+
s.T.Logf("failed to poll run command on VMSS instance %s: %s", instanceID, err)
931+
return
932+
}
926933

927934
respJSON, _ := json.MarshalIndent(runCommandResp, "", " ")
928935
s.T.Logf("run command executed successfully:\n%s", respJSON)

0 commit comments

Comments
 (0)