From 9de011a90626a976e4127563eaca6c424abcfcf8 Mon Sep 17 00:00:00 2001 From: Alex Savchuk Date: Wed, 1 Mar 2023 11:52:40 +0300 Subject: [PATCH] Fix review comment --- pkg/exprparser/interpreter.go | 2 +- pkg/exprparser/interpreter_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/exprparser/interpreter.go b/pkg/exprparser/interpreter.go index 342cdcba109..5df849c7b5a 100644 --- a/pkg/exprparser/interpreter.go +++ b/pkg/exprparser/interpreter.go @@ -368,7 +368,7 @@ func (impl *interperterImpl) compareValues(leftValue reflect.Value, rightValue r case reflect.Invalid: if rightValue.Kind() == reflect.Invalid { - return false, nil + return true, nil } // not possible situation - params are converted to the same type in code above diff --git a/pkg/exprparser/interpreter_test.go b/pkg/exprparser/interpreter_test.go index 9b4552468ce..01eb25f4126 100644 --- a/pkg/exprparser/interpreter_test.go +++ b/pkg/exprparser/interpreter_test.go @@ -72,7 +72,7 @@ func TestOperators(t *testing.T) { {"github.event.commits[0].author.username != github.event.commits[1].author.username", true, "property-comparison1", ""}, {"github.event.commits[0].author.username1 != github.event.commits[1].author.username", true, "property-comparison2", ""}, {"github.event.commits[0].author.username != github.event.commits[1].author.username1", true, "property-comparison3", ""}, - {"github.event.commits[0].author.username1 != github.event.commits[1].author.username2", false, "property-comparison4", ""}, + {"github.event.commits[0].author.username1 != github.event.commits[1].author.username2", true, "property-comparison4", ""}, {"secrets != env", nil, "property-comparison5", "Compare not implemented for types: left: map, right: map"}, }