test(firewall): use require.NoError to halt on fatal errors

This commit is contained in:
Andras Bacsai
2026-05-02 18:17:28 +02:00
parent a896d5f991
commit 6e80c95183
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -94,7 +94,7 @@ func TestEmitAllowRevoke_PostsOneAllowToCoold(t *testing.T) {
rootCmdFor(inner)
err := emitAllowRevoke(context.Background(), inner, parent, local, fr, false)
assert.NoError(t, err)
require.NoError(t, err)
var posts []string
for _, c := range fr.calls {
@@ -185,7 +185,7 @@ func TestEmitAllowRevoke_RevokeIssuesDelete(t *testing.T) {
rootCmdFor(inner)
err := emitAllowRevoke(context.Background(), inner, parent, local, fr, true)
assert.NoError(t, err)
require.NoError(t, err)
var deletes []string
for _, c := range fr.calls {
+2 -1
View File
@@ -6,6 +6,7 @@ import (
"github.com/spf13/cobra"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/coollabsio/coolify-cli/cmd/common"
)
@@ -67,7 +68,7 @@ func TestEmitContainers_AllNamespaces_FansOutAcrossNetworks(t *testing.T) {
rootCmdFor(inner)
err := emitContainers(context.Background(), inner, parent, fr)
assert.NoError(t, err)
require.NoError(t, err)
// Expect one `podman network ls` discovery call + one `podman ps` per
// discovered namespace (default + alpha = 2).