Skip to content

Commit a652847

Browse files
committed
test: use a valid context instead of legacy user format in relay test helper
The assertSDKEndpointsAvailability helper used the legacy LDUser shape ({"key":"userkey"}, no kind) for the streaming mobile /meval and JS /eval endpoints. Replace simpleUserJSON and simpleUserBase64 with a valid evaluation context ({"key":"userkey","kind":"user"}). The helper only asserts HTTP status codes, so the 200/401/404 expectations are unchanged.
1 parent ece5c77 commit a652847

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

relay/testutils_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ func (h relayTestHelper) assertSDKEndpointsAvailability(
8282
// appropriate HTTP status. These are tested more thoroughly in test suites like DoStreamEndpointsTests,
8383
// but we use this simpler test when we're dynamically changing what the credentials are.
8484

85-
simpleUserJSON := []byte(`{"key":"userkey"}`)
86-
simpleUserBase64 := "eyJrZXkiOiJ1c2Vya2V5In0="
85+
simpleUserJSON := []byte(`{"key":"userkey","kind":"user"}`)
86+
simpleUserBase64 := "eyJrZXkiOiJ1c2Vya2V5Iiwia2luZCI6InVzZXIifQ=="
8787
status200Or401, status200Or404 := 200, 200
8888
if !shouldBeAvailable {
8989
status200Or401 = 401

0 commit comments

Comments
 (0)