Skip to content

Commit 58095a0

Browse files
committed
Set not supported for all platforms other than azure
1 parent 8486302 commit 58095a0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/monitortests/cloud/azure/metrics/monitortest.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ func (w *azureMetricsCollector) StartCollection(ctx context.Context, adminRESTCo
174174
return err
175175
}
176176
if infra.Spec.PlatformSpec.Type != configv1.AzurePlatformType {
177-
return nil
177+
reason := fmt.Sprintf("platform %s not supported", infra.Spec.PlatformSpec.Type)
178+
w.notSupportedReason = &monitortestframework.NotSupportedError{
179+
Reason: reason,
180+
}
181+
return w.notSupportedReason
178182
}
179183
// get resource group
180184
w.resourceGroup = infra.Status.PlatformStatus.Azure.ResourceGroupName
@@ -509,5 +513,8 @@ func (*azureMetricsCollector) WriteContentToStorage(ctx context.Context, storage
509513
}
510514

511515
func (w *azureMetricsCollector) Cleanup(ctx context.Context) error {
516+
if w.notSupportedReason != nil {
517+
return w.notSupportedReason
518+
}
512519
return deleteLogAnalyticsWorkspace(ctx, w.credential, w.subscriptionID, w.resourceGroup, w.workspaceName)
513520
}

0 commit comments

Comments
 (0)