TestEnvVarValue: fix assertion

assert.Equal() already follows to pointer and compares by value so we
can just directly pass the values. This will make errors much more
obvious. Also remove the fmt.Println() since the error now contains the
values.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2022-07-04 17:32:13 +02:00
parent 3fbe933712
commit 5b1867923e

View File

@ -2,7 +2,6 @@ package kube
import (
"encoding/json"
"fmt"
"math"
"runtime"
"strconv"
@ -777,8 +776,7 @@ func TestEnvVarValue(t *testing.T) {
if test.expected == nilString {
assert.Nil(t, result)
} else {
fmt.Println(*result, test.expected)
assert.Equal(t, &(test.expected), result)
assert.Equal(t, test.expected, *result)
}
})
}