AB#2360 enterprise build tag (#397)

* enterprise build switch to disable license checking in default (OSS) version
* remove community license quota
* empty image references on OSS build in config
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
Fabian Kammel 2022-08-25 14:06:29 +02:00 committed by GitHub
parent 6b1c20792a
commit 45beec15f5
13 changed files with 126 additions and 58 deletions

View file

@ -9,18 +9,13 @@ import (
"github.com/stretchr/testify/assert"
)
func TestCheckQuotaIntegration(t *testing.T) {
func TestQuotaCheckIntegration(t *testing.T) {
testCases := map[string]struct {
license string
action Action
wantQuota int
wantError bool
}{
"ES license has quota 256": {
license: "***REMOVED***",
action: test,
wantQuota: 256,
},
"OSS license has quota 8": {
license: CommunityLicense,
action: test,
@ -49,11 +44,11 @@ func TestCheckQuotaIntegration(t *testing.T) {
client := NewClient()
req := CheckQuotaRequest{
req := QuotaCheckRequest{
Action: tc.action,
License: tc.license,
}
resp, err := client.CheckQuota(context.Background(), req)
resp, err := client.QuotaCheck(context.Background(), req)
if tc.wantError {
assert.Error(err)