mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 06:54:32 +00:00
testifylint: enable more rules (#8024)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -138,7 +138,7 @@ func TestCreateOptions_OrderedResources(t *testing.T) {
|
||||
"pods": "ns1/p1,ns1/p2",
|
||||
"persistentvolumeclaims": "ns2/pvc1,ns2/pvc2",
|
||||
}
|
||||
assert.Equal(t, orderedResources, expectedResources)
|
||||
assert.Equal(t, expectedResources, orderedResources)
|
||||
|
||||
orderedResources, err = ParseOrderedResources("pods= ns1/p1,ns1/p2 ; persistentvolumes=pv1,pv2")
|
||||
assert.NoError(t, err)
|
||||
@@ -147,7 +147,7 @@ func TestCreateOptions_OrderedResources(t *testing.T) {
|
||||
"pods": "ns1/p1,ns1/p2",
|
||||
"persistentvolumes": "pv1,pv2",
|
||||
}
|
||||
assert.Equal(t, orderedResources, expectedMixedResources)
|
||||
assert.Equal(t, expectedMixedResources, orderedResources)
|
||||
}
|
||||
|
||||
func TestCreateCommand(t *testing.T) {
|
||||
|
||||
@@ -79,7 +79,7 @@ func TestNewLogsCommand(t *testing.T) {
|
||||
|
||||
err = l.Run(c, f)
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), fmt.Sprintf("logs for backup \"%s\" are not available until it's finished processing", backupName))
|
||||
require.ErrorContains(t, err, fmt.Sprintf("logs for backup \"%s\" are not available until it's finished processing", backupName))
|
||||
})
|
||||
|
||||
t.Run("Backup not exist test", func(t *testing.T) {
|
||||
|
||||
@@ -20,7 +20,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@@ -166,7 +165,7 @@ func Test_getDataPathConfigs(t *testing.T) {
|
||||
if test.expectLog == "" {
|
||||
assert.Equal(t, "", logBuffer)
|
||||
} else {
|
||||
assert.True(t, strings.Contains(logBuffer, test.expectLog))
|
||||
assert.Contains(t, logBuffer, test.expectLog)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -384,7 +383,7 @@ func Test_getDataPathConcurrentNum(t *testing.T) {
|
||||
if test.expectLog == "" {
|
||||
assert.Equal(t, "", logBuffer)
|
||||
} else {
|
||||
assert.True(t, strings.Contains(logBuffer, test.expectLog))
|
||||
assert.Contains(t, logBuffer, test.expectLog)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user