diff --git a/internal/license/BUILD.bazel b/internal/license/BUILD.bazel index 155e436c1..84e64da1a 100644 --- a/internal/license/BUILD.bazel +++ b/internal/license/BUILD.bazel @@ -26,7 +26,6 @@ go_test( name = "license_test", srcs = [ "file_test.go", - "license_integration_test.go", "license_test.go", ], embed = [":license"], diff --git a/internal/license/integration/BUILD.bazel b/internal/license/integration/BUILD.bazel new file mode 100644 index 000000000..3c65cd83a --- /dev/null +++ b/internal/license/integration/BUILD.bazel @@ -0,0 +1,13 @@ +load("//bazel/go:go_test.bzl", "go_test") + +go_test( + name = "integration_test", + srcs = ["license_integration_test.go"], + tags = [ + "requires-network", + ], + deps = [ + "//internal/license", + "@com_github_stretchr_testify//assert", + ], +) diff --git a/internal/license/license_integration_test.go b/internal/license/integration/license_integration_test.go similarity index 77% rename from internal/license/license_integration_test.go rename to internal/license/integration/license_integration_test.go index 1def57d3a..7a6158262 100644 --- a/internal/license/license_integration_test.go +++ b/internal/license/integration/license_integration_test.go @@ -6,12 +6,13 @@ Copyright (c) Edgeless Systems GmbH SPDX-License-Identifier: AGPL-3.0-only */ -package license +package integration import ( "context" "testing" + "github.com/edgelesssys/constellation/v2/internal/license" "github.com/stretchr/testify/assert" ) @@ -22,7 +23,7 @@ func TestQuotaCheckIntegration(t *testing.T) { wantError bool }{ "OSS license has quota 8": { - license: CommunityLicense, + license: license.CommunityLicense, wantQuota: 8, }, "Empty license assumes community": { @@ -35,10 +36,10 @@ func TestQuotaCheckIntegration(t *testing.T) { t.Run(name, func(t *testing.T) { assert := assert.New(t) - client := NewClient() + client := license.NewClient() - req := QuotaCheckRequest{ - Action: test, + req := license.QuotaCheckRequest{ + Action: license.Action("test"), License: tc.license, } resp, err := client.QuotaCheck(context.Background(), req)