1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
package telemetry
import (
"testing"
)
func TestCredentialsRequestCounter(t *testing.T) {
expectedName := METRIC_COUNTER_CREDENTIALS_REQUEST
expectedDescription := "The total number of times new access tokens have been requested using ClientCredentials."
if CredentialsRequest == nil {
t.Fatalf("Expected CredentialsRequest to be initialized, but got nil")
}
if CredentialsRequest.GetName() != expectedName {
t.Errorf("Expected Name to be '%s', but got '%s'", expectedName, CredentialsRequest.GetName())
}
if CredentialsRequest.GetDescription() != expectedDescription {
t.Errorf("Expected Description to be '%s', but got '%s'", expectedDescription, CredentialsRequest.GetDescription())
}
}
|