Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziopandini committed Feb 27, 2024
1 parent 7be1c39 commit 98cab37
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions hack/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ set -o nounset # will error if variables are used without first being defined
set -o pipefail # any non-zero exit code in a piped command causes the pipeline to fail with that code

#TMP to test vcsim e2e before creating a job in test-infa
if [[ "${GINKGO_FOCUS}" = "\\[PR-Blocking\\]" ]]; then
export GINKGO_FOCUS="\\[vcsim\\]"
echo "GINKGO_FOCUS=${GINKGO_FOCUS}"
if [[ "${GINKGO_FOCUS}" = "\[PR-Blocking\]" ]]; then
export GINKGO_FOCUS="\[vcsim\]"
fi
echo "GINKGO_FOCUS=${GINKGO_FOCUS}"

export PATH=${PWD}/hack/tools/bin:${PATH}
REPO_ROOT=$(git rev-parse --show-toplevel)
Expand Down
12 changes: 10 additions & 2 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,13 @@ var _ = SynchronizedBeforeSuite(func() []byte {

namespaces = map[*corev1.Namespace]context.CancelFunc{}

By("Initializing the vSphere session to ensure credentials are working", initVSphereSession)
if testTarget == VCenterTestTarget {
// Some of the tests targeting VCenter relies on an additional VSphere session to check test progress;
// such session is create once, and shared across many tests.
// This approach currently is not compatible with vcsim test setup, where we are creating a vcsim instance
// for each test.
By("Initializing the vSphere session to ensure credentials are working", initVSphereSession)
}

var err error
e2eConfig, err = vsphereframework.LoadE2EConfig(ctx, configPath)
Expand Down Expand Up @@ -310,7 +316,9 @@ var _ = SynchronizedAfterSuite(func() {
}
}

By("Cleaning up the vSphere session", terminateVSphereSession)
if testTarget == VCenterTestTarget {
By("Cleaning up the vSphere session", terminateVSphereSession)
}
if !skipCleanup {
By("Tearing down the management cluster")
vsphereframework.TearDown(ctx, bootstrapClusterProvider, bootstrapClusterProxy)
Expand Down

0 comments on commit 98cab37

Please sign in to comment.