Simplify test

This commit is contained in:
Pieter Noordhuis 2024-10-24 11:33:15 +02:00
parent 1c5540201c
commit 03e9b5fa1a
No known key found for this signature in database
GPG Key ID: 12ACCCC104CF2930
1 changed files with 2 additions and 4 deletions

View File

@ -76,15 +76,13 @@ func TestLookup_Nominal(t *testing.T) {
// Lookup by key only.
out, err := Lookup(b, "foo")
require.NoError(t, err)
if assert.NotNil(t, out) {
if assert.NoError(t, err) {
assert.Equal(t, "Foo job", out.Resource.GetName())
}
// Lookup by type and key.
out, err = Lookup(b, "jobs.foo")
require.NoError(t, err)
if assert.NotNil(t, out) {
if assert.NoError(t, err) {
assert.Equal(t, "Foo job", out.Resource.GetName())
}
}