Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
use require testing package
Browse files Browse the repository at this point in the history
  • Loading branch information
samos123 committed Sep 6, 2023
1 parent c78e253 commit baeb88c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions internal/controller/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"reflect"
"testing"

"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
)

Expand Down Expand Up @@ -57,13 +58,8 @@ func Test_resolveEnv(t *testing.T) {

for _, tc := range testCases {
t.Log("running Test_resolveEnv with input", tc.input)

actual, err := resolveEnv(tc.input)
if err != nil {
t.Errorf("error with case %v: %v", tc.input, err)
}
if !reflect.DeepEqual(actual, tc.expected) {
t.Errorf("resolveEnv(%v): expected %v, actual %v", tc.input, tc.expected, actual)
}
require.NoErrorf(t, err, "error with case %v: %v", tc.input, err)
require.Truef(t, reflect.DeepEqual(actual, tc.expected), "resolveEnv(%v): expected %v, actual %v", tc.input, tc.expected, actual)
}
}

0 comments on commit baeb88c

Please sign in to comment.