Path: blob/main/install/installer/pkg/components/public-api-server/objects_test.go
2501 views
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.1/// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package public_api_server56import (7"testing"89"github.com/stretchr/testify/require"1011"github.com/gitpod-io/gitpod/installer/pkg/common"12config "github.com/gitpod-io/gitpod/installer/pkg/config/v1"13"github.com/gitpod-io/gitpod/installer/pkg/config/v1/experimental"14"github.com/gitpod-io/gitpod/installer/pkg/config/versions"15)1617func TestObjects_RenderedByDefault(t *testing.T) {18ctx := renderContextWithPublicAPI(t)1920objects, err := Objects(ctx)21require.NoError(t, err)22require.NotEmpty(t, objects)23}2425func renderContextWithPublicAPI(t *testing.T) *common.RenderContext {26ctx, err := common.NewRenderContext(config.Config{27Domain: "test.domain.everything.awesome.is",28Experimental: &experimental.Config{29WebApp: &experimental.WebAppConfig{30PublicAPI: &experimental.PublicAPIConfig{31StripeSecretName: "stripe-webhook-secret",32PersonalAccessTokenSigningKeySecretName: "personal-access-token-signing-key",33},34},35},36Database: config.Database{37CloudSQL: &config.DatabaseCloudSQL{38ServiceAccount: config.ObjectRef{39Name: "gcp-db-creds-service-account-name",40},41},42},43}, versions.Manifest{44Components: versions.Components{45PublicAPIServer: versions.Versioned{46Version: "commit-test-latest",47},48ServiceWaiter: versions.Versioned{49Version: "commit-test-latest",50},51},52}, "test-namespace")53require.NoError(t, err)5455return ctx56}575859