use assert instead of require

This commit is contained in:
Robert Kaussow 2024-05-06 21:03:08 +02:00
parent 3148862ffa
commit aa769cb2fa
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ package ansible
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
"github.com/urfave/cli/v2"
)
@ -23,7 +23,7 @@ func TestVersion(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cmd := tt.ansible.Version()
require.Equal(t, tt.want, cmd.Cmd.Args)
assert.Equal(t, tt.want, cmd.Cmd.Args)
})
}
}
@ -62,7 +62,7 @@ func TestGalaxyInstall(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cmd := tt.ansible.GalaxyInstall()
require.Equal(t, tt.want, cmd.Cmd.Args)
assert.Equal(t, tt.want, cmd.Cmd.Args)
})
}
}
@ -200,7 +200,7 @@ func TestAnsibleCommand(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cmd := tt.ansible.Play()
require.Equal(t, tt.want, cmd.Cmd.Args)
assert.Equal(t, tt.want, cmd.Cmd.Args)
})
}
}

View File

@ -3,7 +3,7 @@ package plugin
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
)
func TestPipInstall(t *testing.T) {
@ -22,7 +22,7 @@ func TestPipInstall(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cmd := PipInstall(tt.requirements)
require.Equal(t, tt.want, cmd.Cmd.Args)
assert.Equal(t, tt.want, cmd.Cmd.Args)
})
}
}