@@ -11,9 +11,11 @@ import (
11
11
"github.com/gitpod-io/gitpod/common-go/baseserver"
12
12
"github.com/gitpod-io/gitpod/installer/pkg/common"
13
13
config "github.com/gitpod-io/gitpod/installer/pkg/config/v1"
14
+ "github.com/gitpod-io/gitpod/installer/pkg/config/v1/experimental"
14
15
"github.com/gitpod-io/gitpod/installer/pkg/config/versions"
15
16
"github.com/stretchr/testify/require"
16
17
corev1 "k8s.io/api/core/v1"
18
+ v1 "k8s.io/api/core/v1"
17
19
)
18
20
19
21
func TestKubeRBACProxyContainer_DefaultPorts (t * testing.T ) {
@@ -73,3 +75,19 @@ func TestServerComponentWaiterContainer(t *testing.T) {
73
75
require .Equal (t , labels , "app=gitpod,component=server" )
74
76
require .Equal (t , []string {"-v" , "component" , "--namespace" , "test_namespace" , "--component" , common .ServerComponent , "--labels" , labels , "--image" , ctx .Config .Repository + "/server:" + "happy_path_server_image" }, container .Args )
75
77
}
78
+
79
+ func TestConfigcatEnvOutOfCluster (t * testing.T ) {
80
+ ctx , err := common .NewRenderContext (config.Config {
81
+ Domain : "gitpod.io" ,
82
+ Experimental : & experimental.Config {
83
+ WebApp : & experimental.WebAppConfig {
84
+ ConfigcatKey : "foo" ,
85
+ },
86
+ },
87
+ }, versions.Manifest {}, "test_namespace" )
88
+ require .NoError (t , err )
89
+
90
+ envVars := common .ConfigcatEnvOutOfCluster (ctx )
91
+ require .Equal (t , len (envVars ), 2 )
92
+ require .Equal (t , envVars , []v1.EnvVar ([]v1.EnvVar {{Name : "CONFIGCAT_SDK_KEY" , Value : "gitpod" }, {Name : "CONFIGCAT_BASE_URL" , Value : "https://gitpod.io/configcat" }}))
93
+ }
0 commit comments