test/distro/rhel84: invert condition

I'm sorry, I need to extend this condition and my brain isn't powerful enough
to reason about complex negative conditions.

Not a functional change.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2021-02-13 09:24:21 +01:00 committed by Tom Gundersen
parent 5eb402415d
commit 4492448f49

View file

@ -533,12 +533,12 @@ func TestRhel84_GetArch(t *testing.T) {
t.Run(dist.name, func(t *testing.T) {
for _, a := range arches {
actualArch, err := dist.distro.GetArch(a.name)
if !a.errorExpected {
assert.Equal(t, a.name, actualArch.Name())
assert.NoError(t, err)
} else {
if a.errorExpected {
assert.Nil(t, actualArch)
assert.Error(t, err)
} else {
assert.Equal(t, a.name, actualArch.Name())
assert.NoError(t, err)
}
}
})