Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions sdktests/server_side_events_summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,19 @@ func flagCounter(value interface{}, variation int, version int, count int) m.Mat
)
}

// overrideFlagCounter is the same as flagCounter, but for a flag whose evaluation was overridden
// by the flag overrides feature: the counter must additionally carry "override": true so that
// override evaluations are aggregated separately from ordinary ones.
func overrideFlagCounter(value interface{}, variation int, version int, count int) m.Matcher {
return m.MapOf(
m.KV("value", m.JSONEqual(value)),
m.KV("variation", m.Equal(variation)),
m.KV("version", m.Equal(version)),
m.KV("count", m.Equal(count)),
m.KV("override", m.Equal(true)),
)
}

func flagCounterWithAnyCount(value interface{}, variation int, version int) m.Matcher {
return m.MapOf(
m.KV("value", m.JSONEqual(value)),
Expand Down
Loading
Loading