Skip to content

[wip] test: update kubetest2 version #1043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions test/k8s-integration/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,10 +725,13 @@ func runTestsWithConfig(testParams *testParameters, testConfigArg, reportPrefix
runID = string(uuid.NewUUID())
}

runDir := filepath.Join(testParams.pkgDir, "_rundir")

// Usage: kubetest2 <deployer> [Flags] [DeployerFlags] -- [TesterArgs]
// [Flags]
kubeTest2Args := []string{
*deploymentStrat,
fmt.Sprintf("--rundir=%s", runDir),
fmt.Sprintf("--run-id=%s", runID),
"--test=ginkgo",
}
Expand All @@ -745,16 +748,11 @@ func runTestsWithConfig(testParams *testParameters, testConfigArg, reportPrefix
if len(*testVersion) != 0 {
if *testVersion == "master" {
// the kubernetes binaries should've already been built above because of `--kube-version`
// or by the user if --local-k8s-dir was set, these binaries should be copied to the
// path sent to kubetest2 through its --artifacts path

// pkg/_artifacts is the default value that kubetests uses for --artifacts
kubernetesTestBinariesPath := filepath.Join(testParams.pkgDir, "_artifacts")
if kubetestDumpDir != "" {
// a custom artifacts dir was set
kubernetesTestBinariesPath = kubetestDumpDir
}
kubernetesTestBinariesPath = filepath.Join(kubernetesTestBinariesPath, runID)
// or by the user if --local-k8s-dir was set, copy these binaries to a place where
// kubetest2-tester-ginkgo will find them

// runDir/runID is the default place kubetest2-tester-ginkgo will look
kubernetesTestBinariesPath := filepath.Join(runDir, runID)

klog.Infof("Copying kubernetes binaries to path=%s to run the tests", kubernetesTestBinariesPath)
err := copyKubernetesTestBinaries(testParams.k8sSourceDir, kubernetesTestBinariesPath)
Expand Down
2 changes: 1 addition & 1 deletion test/run-k8s-integration-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export GCE_PD_VERBOSITY=9
make -C "${PKGDIR}" test-k8s-integration

if [ "$use_kubetest2" = true ]; then
kt2_version=0e09086b60c122e1084edd2368d3d27fe36f384f
kt2_version=26f2492dc52f7259ccff48856c444c421f65df50
go install sigs.k8s.io/kubetest2@${kt2_version}
go install sigs.k8s.io/kubetest2/kubetest2-gce@${kt2_version}
go install sigs.k8s.io/kubetest2/kubetest2-gke@${kt2_version}
Expand Down
2 changes: 1 addition & 1 deletion test/run-k8s-integration-migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ readonly use_kubetest2=${USE_KUBETEST2:-false}
make -C "${PKGDIR}" test-k8s-integration

if [ "$use_kubetest2" = true ]; then
kt2_version=0e09086b60c122e1084edd2368d3d27fe36f384f
kt2_version=26f2492dc52f7259ccff48856c444c421f65df50
go install sigs.k8s.io/kubetest2@${kt2_version}
go install sigs.k8s.io/kubetest2/kubetest2-gce@${kt2_version}
go install sigs.k8s.io/kubetest2/kubetest2-gke@${kt2_version}
Expand Down
2 changes: 1 addition & 1 deletion test/run-k8s-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ readonly GCE_PD_TEST_FOCUS="PersistentVolumes\sGCEPD|[V|v]olume\sexpand|\[sig-st
make -C "${PKGDIR}" test-k8s-integration

if [ "$use_kubetest2" = true ]; then
kt2_version=0e09086b60c122e1084edd2368d3d27fe36f384f
kt2_version=26f2492dc52f7259ccff48856c444c421f65df50
go install sigs.k8s.io/kubetest2@${kt2_version}
go install sigs.k8s.io/kubetest2/kubetest2-gce@${kt2_version}
go install sigs.k8s.io/kubetest2/kubetest2-gke@${kt2_version}
Expand Down