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

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

* [AZURE] t.FatalF() for nil pointer
This commit is contained in:
ga 2020-04-16 10:08:46 -04:00 committed by GitHub
parent 4f2f51602e
commit cf1b72e457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)