Skip to content

Commit

Permalink
chore: rename exactValue to strict
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Rosiek <[email protected]>
  • Loading branch information
Dominik Rosiek committed May 23, 2024
1 parent 92d02d2 commit da5afa6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/integration/internal/stepfuncs/assess_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func WaitUntilExpectedExactLogsPresent(
expectedLogsMetadata map[string]string,
waitDuration time.Duration,
tickDuration time.Duration,
exactValue bool,
strict bool,
) features.Func {
return func(ctx context.Context, t *testing.T, envConf *envconf.Config) context.Context {
k8s_internal.WaitUntilSumologicMockAvailable(ctx, t, waitDuration, tickDuration)
Expand All @@ -388,7 +388,7 @@ func WaitUntilExpectedExactLogsPresent(
log.ErrorS(err, "failed getting log counts from sumologic-mock")
return false
}
if !exactValue && logsCount < expectedLogsCount {
if !strict && logsCount < expectedLogsCount {
log.InfoS(
"received logs, less than expected",
"received", logsCount,
Expand All @@ -397,7 +397,7 @@ func WaitUntilExpectedExactLogsPresent(
return false
}

if exactValue && logsCount != expectedLogsCount {
if strict && logsCount != expectedLogsCount {
log.InfoS(
"received logs, not the same like expected",
"received", logsCount,
Expand Down Expand Up @@ -437,7 +437,7 @@ type WaitForLogs func(
expectedLogsMetadata map[string]string,
waitDuration time.Duration,
tickDuration time.Duration,
exactValue bool,
strict bool,
) features.Func

// WaitUntilAdditionalLogsPresent returns a features.Func that can be used in `Assess` calls.
Expand All @@ -448,7 +448,7 @@ func WaitUntilExpectedAdditionalLogsPresent(
expectedLogsMetadata map[string]string,
waitDuration time.Duration,
tickDuration time.Duration,
exactValue bool,
strict bool,
) features.Func {
return func(ctx context.Context, t *testing.T, envConf *envconf.Config) context.Context {
newCtx := ctxopts.WithNamespace(ctx, internal.AdditionalSumologicMockNamespace)
Expand All @@ -463,7 +463,7 @@ func WaitUntilExpectedAdditionalLogsPresent(
log.ErrorS(err, "failed getting log counts from sumologic-mock")
return false
}
if !exactValue && logsCount < expectedLogsCount {
if !strict && logsCount < expectedLogsCount {
log.InfoS(
"received logs, less than expected",
"received", logsCount,
Expand All @@ -472,7 +472,7 @@ func WaitUntilExpectedAdditionalLogsPresent(
return false
}

if exactValue && logsCount != expectedLogsCount {
if strict && logsCount != expectedLogsCount {
log.InfoS(
"received logs, not the same like expected",
"received", logsCount,
Expand Down

0 comments on commit da5afa6

Please sign in to comment.