only use test action in license integration test

This commit is contained in:
Thomas Tendyck 2022-09-19 11:58:44 +02:00 committed by Thomas Tendyck
parent bff4351839
commit 3d50869ed6

View File

@ -18,28 +18,15 @@ import (
func TestQuotaCheckIntegration(t *testing.T) { func TestQuotaCheckIntegration(t *testing.T) {
testCases := map[string]struct { testCases := map[string]struct {
license string license string
action Action
wantQuota int wantQuota int
wantError bool wantError bool
}{ }{
"OSS license has quota 8": { "OSS license has quota 8": {
license: CommunityLicense, license: CommunityLicense,
action: test,
wantQuota: 8,
},
"OSS license missing action": {
license: CommunityLicense,
action: "",
wantQuota: 8, wantQuota: 8,
}, },
"Empty license assumes community": { "Empty license assumes community": {
license: "", license: "",
action: test,
wantQuota: 8,
},
"Empty request": {
license: "",
action: "",
wantQuota: 8, wantQuota: 8,
}, },
} }
@ -51,7 +38,7 @@ func TestQuotaCheckIntegration(t *testing.T) {
client := NewClient() client := NewClient()
req := QuotaCheckRequest{ req := QuotaCheckRequest{
Action: tc.action, Action: test,
License: tc.license, License: tc.license,
} }
resp, err := client.QuotaCheck(context.Background(), req) resp, err := client.QuotaCheck(context.Background(), req)