Skip to content

Commit 75a3923

Browse files
committed
fix: install ginkgo v2 CLI and fix bare DeferCleanup in finalize_test
- Update ginkgo install path to github.com/onsi/ginkgo/v2/ginkgo - Wrap bare DeferCleanup in BeforeEach in CopyFilesToPublic Describe block; DeferCleanup must be called inside a setup node, not a container node.
1 parent 82c6974 commit 75a3923

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

scripts/.util/tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function util::tools::ginkgo::install() {
4040
pushd /tmp > /dev/null || return
4141
GOBIN="${dir}" \
4242
go install \
43-
github.com/onsi/ginkgo/ginkgo@latest
43+
github.com/onsi/ginkgo/v2/ginkgo@latest
4444
popd > /dev/null || return
4545
fi
4646
}

src/staticfile/finalize/finalize_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -906,9 +906,11 @@ var _ = Describe("Compile", func() {
906906
Expect(err).To(BeNil())
907907
})
908908

909-
DeferCleanup(func() {
910-
err = os.RemoveAll(appRootDir)
911-
Expect(err).To(BeNil())
909+
BeforeEach(func() {
910+
DeferCleanup(func() {
911+
err = os.RemoveAll(appRootDir)
912+
Expect(err).To(BeNil())
913+
})
912914
})
913915

914916
Context("The appRootDir is <buildDir>/public", func() {

0 commit comments

Comments
 (0)