Skip to content

Commit

Permalink
Remove e2e directory creation and related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
huffmanca committed Nov 11, 2020
1 parent a1b0f99 commit 0b52afe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
12 changes: 0 additions & 12 deletions hack/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,6 @@ runTestAPI()
go test -count=1 -v ./hack/_embedded/embedded_test.go
)

runTestAPIWithCustomTargetPaths()
(
CSI_ENDPOINT=$1 ./bin/mock-driver &
local pid=$!
trap 'cleanup $pid $1' EXIT

# Running a specific test to verify that the custom target paths are called
# a deterministic number of times.
go test -count=1 -v ./hack/_apitest2/api_test.go -ginkgo.focus="NodePublishVolume"
)

runTestWithCustomTargetPaths()
(

Expand Down Expand Up @@ -117,5 +106,4 @@ runTest "${UDS}" "${UDS}" &&
runTestWithCreds "${UDS}" "${UDS}" &&
runTestAPI "${UDS}" &&
runTestWithDifferentAddresses "${UDS_NODE}" "${UDS_CONTROLLER}" &&
runTestAPIWithCustomTargetPaths "${UDS}" &&
runTestWithCustomTargetPaths "${UDS}" "${UDS}"
13 changes: 4 additions & 9 deletions pkg/sanity/sanity.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,10 @@ func (sc *TestContext) Setup() {

By("creating mount and staging directories")

// If callback function for creating target dir is specified, use it.
targetPath, err := createMountTargetLocation(sc.Config.TargetPath, sc.Config.CreateTargetPathCmd, sc.Config.CreateTargetDir, sc.Config.CreatePathCmdTimeout)
Expect(err).NotTo(HaveOccurred(), "failed to create target directory %s", targetPath)
sc.TargetPath = targetPath

// If callback function for creating staging dir is specified, use it.
stagingPath, err := createMountTargetLocation(sc.Config.StagingPath, sc.Config.CreateStagingPathCmd, sc.Config.CreateStagingDir, sc.Config.CreatePathCmdTimeout)
Expect(err).NotTo(HaveOccurred(), "failed to create staging directory %s", stagingPath)
sc.StagingPath = stagingPath
// We no longer need to create these directories, as it's handled during the NodeStageVolume
// and NodePublishVolume calls
sc.TargetPath = sc.Config.TargetPath
sc.StagingPath = sc.Config.StagingPath
}

// Teardown must be called after each test. It frees resources
Expand Down

0 comments on commit 0b52afe

Please sign in to comment.