File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,13 @@ func TestClientUpdatesEnvironmentOnStartForLocalEvaluation(t *testing.T) {
9696 requestReceived .mu .Unlock ()
9797 assert .Equal (t , req .URL .Path , "/api/v1/environment-document/" )
9898 assert .Equal (t , fixtures .EnvironmentAPIKey , req .Header .Get ("X-Environment-Key" ))
99+
100+ rw .Header ().Set ("Content-Type" , "application/json" )
101+ rw .WriteHeader (http .StatusOK )
102+ _ , err := io .WriteString (rw , fixtures .EnvironmentJson )
103+ if err != nil {
104+ panic (err )
105+ }
99106 }))
100107 defer server .Close ()
101108
@@ -125,6 +132,13 @@ func TestClientUpdatesEnvironmentOnEachRefresh(t *testing.T) {
125132 actualEnvironmentRefreshCounter .mu .Unlock ()
126133 assert .Equal (t , req .URL .Path , "/api/v1/environment-document/" )
127134 assert .Equal (t , fixtures .EnvironmentAPIKey , req .Header .Get ("X-Environment-Key" ))
135+
136+ rw .Header ().Set ("Content-Type" , "application/json" )
137+ rw .WriteHeader (http .StatusOK )
138+ _ , err := io .WriteString (rw , fixtures .EnvironmentJson )
139+ if err != nil {
140+ panic (err )
141+ }
128142 }))
129143 defer server .Close ()
130144
You can’t perform that action at this time.
0 commit comments