Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Apr 3, 2023
1 parent 67f15a6 commit df43c8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/pkg/service/flag-evaluation/flag_evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func resolve[T constraints](
zap.Strings("context-keys", formatContextKeys(ctx)),
)

var evalErrFormatted error = nil
var evalErrFormatted error
result, variant, reason, evalErr := resolver(reqID, flagKey, ctx)
if evalErr != nil {
logger.WarnWithID(reqID, fmt.Sprintf("returning error response, reason: %v", evalErr))
Expand Down
10 changes: 5 additions & 5 deletions core/pkg/service/flag-evaluation/flag_evaluator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestFlag_Evaluation_ResolveBoolean(t *testing.T) {
wantErr: nil,
},
"eval returns error": {
mCount: 0,
mCount: 1,
evalFields: resolveBooleanEvalFields{
result: true,
variant: ":(",
Expand Down Expand Up @@ -307,7 +307,7 @@ func TestFlag_Evaluation_ResolveString(t *testing.T) {
wantErr: nil,
},
"eval returns error": {
mCount: 0,
mCount: 1,
evalFields: resolveStringEvalFields{
result: "true",
variant: ":(",
Expand Down Expand Up @@ -454,7 +454,7 @@ func TestFlag_Evaluation_ResolveFloat(t *testing.T) {
wantErr: nil,
},
"eval returns error": {
mCount: 0,
mCount: 1,
evalFields: resolveFloatEvalFields{
result: 12,
variant: ":(",
Expand Down Expand Up @@ -601,7 +601,7 @@ func TestFlag_Evaluation_ResolveInt(t *testing.T) {
wantErr: nil,
},
"eval returns error": {
mCount: 0,
mCount: 1,
evalFields: resolveIntEvalFields{
result: 12,
variant: ":(",
Expand Down Expand Up @@ -750,7 +750,7 @@ func TestFlag_Evaluation_ResolveObject(t *testing.T) {
wantErr: nil,
},
"eval returns error": {
mCount: 0,
mCount: 1,
evalFields: resolveObjectEvalFields{
result: map[string]interface{}{
"food": "bars",
Expand Down

0 comments on commit df43c8f

Please sign in to comment.