[AZURE] t.Fatalf() for nil pointer (#90154)

* [AZURE] t.FatalF() for nil pointer

* [AZURE] t.FatalF() for nil pointer

Kubernetes-commit: cf1b72e4571b69995ce65a659a9b67c867b1d1b0
This commit is contained in:
ga
2020-04-16 10:08:46 -04:00
committed by Kubernetes Publisher
parent 4529075edf
commit b3b874faea
4 changed files with 6 additions and 6 deletions

View File

@@ -119,11 +119,11 @@ func TestAzureAuthProvider(t *testing.T) {
}
azureProvider := provider.(*azureAuthProvider)
if azureProvider == nil {
t.Errorf("newAzureAuthProvider should return an instance of type azureAuthProvider")
t.Fatalf("newAzureAuthProvider should return an instance of type azureAuthProvider")
}
ts := azureProvider.tokenSource.(*azureTokenSource)
if ts == nil {
t.Errorf("azureAuthProvider should be an instance of azureTokenSource")
t.Fatalf("azureAuthProvider should be an instance of azureTokenSource")
}
if ts.configMode != v.expectedConfigMode {
t.Errorf("expected configMode: %d, actual: %d", v.expectedConfigMode, ts.configMode)