Skip to content

Commit c704c27

Browse files
authored
add e2e test for getting sandbox segment key (#1183)
* add e2e test for getting sandbox segment key
1 parent 5e9c44d commit c704c27

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

test/e2e/parallel/registration_service_test.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func TestAnalytics(t *testing.T) {
161161
await := WaitForDeployments(t)
162162
route := await.Host().RegistrationServiceURL
163163

164-
assertNotSecuredGetResponseEquals := func(endPointPath, expectedResponseValue string) {
164+
assertNotSecuredGetResponseEquals := func(t *testing.T, endPointPath, expectedResponseValue string) {
165165
// Call analytics domain endpoint.
166166
req, err := http.NewRequest("GET", fmt.Sprintf("%s/api/v1/%s", route, endPointPath), nil)
167167
require.NoError(t, err)
@@ -183,9 +183,14 @@ func TestAnalytics(t *testing.T) {
183183
require.Equal(t, expectedResponseValue, value)
184184
}
185185

186-
t.Run("get devspaces segment write key 200 OK", func(_ *testing.T) {
186+
t.Run("get devspaces segment write key 200 OK", func(t *testing.T) {
187187
// Call segment write key endpoint.
188-
assertNotSecuredGetResponseEquals("segment-write-key", "test devspaces segment write key")
188+
assertNotSecuredGetResponseEquals(t, "segment-write-key", "test devspaces segment write key")
189+
})
190+
191+
t.Run("get sandbox segment write key 200 OK", func(t *testing.T) {
192+
// Call sandbox segment write key endpoint.
193+
assertNotSecuredGetResponseEquals(t, "analytics/segment-write-key", "test sandbox segment write key")
189194
})
190195
}
191196

0 commit comments

Comments
 (0)