|
9 | 9 | "testing" |
10 | 10 | "time" |
11 | 11 |
|
| 12 | + "github.com/splitio/split-synchronizer/v5/splitio" |
12 | 13 | ilmock "github.com/splitio/split-synchronizer/v5/splitio/common/impressionlistener/mocks" |
13 | 14 | "github.com/splitio/split-synchronizer/v5/splitio/proxy/caching" |
14 | 15 | "github.com/splitio/split-synchronizer/v5/splitio/proxy/storage" |
@@ -79,7 +80,8 @@ func TestSplitChangesEndpoints(t *testing.T) { |
79 | 80 | assert.Equal(t, "split2", changes.Splits[0].Name) |
80 | 81 | assert.False(t, changes.Splits[0].ImpressionsDisabled) |
81 | 82 | assert.Equal(t, "application/json; charset=utf-8", headers.Get("Content-Type")) |
82 | | - |
| 83 | + assert.Equal(t, opts.SpecVersion, headers.Get("Harness-FME-FlagSpec")) |
| 84 | + assert.Equal(t, splitio.Version, headers.Get("Harness-FME-Proxy-Version")) |
83 | 85 | } |
84 | 86 |
|
85 | 87 | func TestSplitChangesWithFlagsetsCaching(t *testing.T) { |
@@ -160,6 +162,8 @@ func TestSplitChangesWithFlagsetsCaching(t *testing.T) { |
160 | 162 | assert.Equal(t, int64(1), changes.Till) |
161 | 163 | assert.Equal(t, "split1", changes.Splits[0].Name) |
162 | 164 | assert.Equal(t, "application/json; charset=utf-8", headers.Get("Content-Type")) |
| 165 | + assert.Equal(t, opts.SpecVersion, headers.Get("Harness-FME-FlagSpec")) |
| 166 | + assert.Equal(t, splitio.Version, headers.Get("Harness-FME-Proxy-Version")) |
163 | 167 | } |
164 | 168 |
|
165 | 169 | func TestSegmentChangesAndMySegmentsEndpoints(t *testing.T) { |
@@ -249,6 +253,8 @@ func TestSegmentChangesAndMySegmentsEndpoints(t *testing.T) { |
249 | 253 | assert.Equal(t, 200, status) |
250 | 254 | assert.Equal(t, []dtos.MySegmentDTO{}, segments) |
251 | 255 | assert.Equal(t, "application/json; charset=utf-8", headers.Get("Content-Type")) |
| 256 | + assert.Equal(t, opts.SpecVersion, headers.Get("Harness-FME-FlagSpec")) |
| 257 | + assert.Equal(t, splitio.Version, headers.Get("Harness-FME-Proxy-Version")) |
252 | 258 | } |
253 | 259 |
|
254 | 260 | func TestMembershipEndpoint(t *testing.T) { |
@@ -284,6 +290,8 @@ func TestMembershipEndpoint(t *testing.T) { |
284 | 290 | assert.Equal(t, 200, status) |
285 | 291 | assert.Equal(t, expected, response) |
286 | 292 | assert.Equal(t, "application/json; charset=utf-8", headers.Get("Content-Type")) |
| 293 | + assert.Equal(t, opts.SpecVersion, headers.Get("Harness-FME-FlagSpec")) |
| 294 | + assert.Equal(t, splitio.Version, headers.Get("Harness-FME-Proxy-Version")) |
287 | 295 | } |
288 | 296 |
|
289 | 297 | func makeOpts() *Options { |
|
0 commit comments