mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-13 11:34:54 +00:00
test: use the Kind constant instead of the string literal (#10524)
e2e-test-kind.yaml / extract (push) Failing after 7s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Failing after 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Scorecard supply-chain security / Scorecard analysis (push) Skipped
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
e2e-test-kind.yaml / extract (push) Failing after 7s
Run the E2E test on kind / get-go-version (push) Failing after 9s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Failing after 3s
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 7s
Scorecard supply-chain security / Scorecard analysis (push) Skipped
Main CI / get-go-version (push) Failing after 8s
Main CI / Build (push) Skipped
* test: use the Kind constant instead of the string literal test/types.go defines `const Kind = "kind"` and most of the suite compares against it, but three sites still use the bare string. deletion.go is inconsistent with itself: the BeforeEach skip uses Kind while the one in runBackupDeletionTests uses "kind", and its skip message hardcodes the provider name where the other formats it. namespace-mapping.go dot-imports test/e2e/test rather than test, so the constant was not in scope there. Import the test package by name, as test/e2e/migration/migration.go already does alongside its framework import, and reference test.Kind. No behavioural change: the constant's value is the string being replaced. Signed-off-by: krishhna24 <krishhnatupedev@gmail.com> * Add changelog for #10524 Signed-off-by: krishhna24 <krishhnatupedev@gmail.com> --------- Signed-off-by: krishhna24 <krishhnatupedev@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"github.com/vmware-tanzu/velero/test"
|
||||
. "github.com/vmware-tanzu/velero/test/e2e/test"
|
||||
. "github.com/vmware-tanzu/velero/test/util/k8s"
|
||||
. "github.com/vmware-tanzu/velero/test/util/kibishii"
|
||||
@@ -34,7 +35,7 @@ func (n *NamespaceMapping) Init() error {
|
||||
n.VeleroCfg.UseVolumeSnapshots = n.UseVolumeSnapshots
|
||||
n.VeleroCfg.UseNodeAgent = !n.UseVolumeSnapshots
|
||||
n.kibishiiData = &KibishiiData{Levels: 2, DirsPerLevel: 10, FilesPerLevel: 10, FileLength: 1024, BlockSize: 1024, PassNum: 0, ExpectedNodes: 2}
|
||||
if n.VeleroCfg.CloudProvider == "kind" {
|
||||
if n.VeleroCfg.CloudProvider == test.Kind {
|
||||
n.kibishiiData = &KibishiiData{Levels: 0, DirsPerLevel: 0, FilesPerLevel: 0, FileLength: 0, BlockSize: 0, PassNum: 0, ExpectedNodes: 2}
|
||||
}
|
||||
backupType := "fs-backup"
|
||||
@@ -70,7 +71,7 @@ func (n *NamespaceMapping) Init() error {
|
||||
"create", "--namespace", n.VeleroCfg.VeleroNamespace, "backup", n.BackupName,
|
||||
"--include-namespaces", strings.Join(*n.NSIncluded, ","), "--wait",
|
||||
}
|
||||
if n.VeleroCfg.CloudProvider == "kind" {
|
||||
if n.VeleroCfg.CloudProvider == test.Kind {
|
||||
// don't test volume snapshotter or file system backup on kind
|
||||
n.BackupArgs = append(n.BackupArgs, "--snapshot-volumes=false")
|
||||
n.UseVolumeSnapshots = false
|
||||
|
||||
Reference in New Issue
Block a user