Skip to content

Commit 6ee15dc

Browse files
committed
bump gomega and validate integration with Gomega with SpecContext
1 parent 5915214 commit 6ee15dc

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

RELEASING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
A Ginkgo release is a tagged git sha and a GitHub release. To cut a release:
22

33
1. Ensure CHANGELOG.md is up to date.
4-
- Use `git log --pretty=format:'- %s [%h]' HEAD...vX.X.X` to list all the commits since the last release
4+
- Use
5+
```bash
6+
LAST_VERSION=$(git tag --sort=version:refname | tail -n1)
7+
CHANGES=$(git log --pretty=format:'- %s [%h]' HEAD...$LAST_VERSION)
8+
echo -e "## NEXT\n\n$CHANGES\n\n### Features\n\n## Fixes\n\n## Maintenance\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
9+
```
10+
to update the changelog
511
- Categorize the changes into
612
- Breaking Changes (requires a major version)
713
- New Features (minor version)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.18
55
require (
66
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
77
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
8-
github.com/onsi/gomega v1.20.2
8+
github.com/onsi/gomega v1.21.0
99
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
1010
golang.org/x/tools v0.1.12
1111
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe
1717
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
1818
github.com/onsi/gomega v1.20.2 h1:8uQq0zMgLEfa0vRrrBgaJF2gyW9Da9BmfGV+OyUzfkY=
1919
github.com/onsi/gomega v1.20.2/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
20+
github.com/onsi/gomega v1.21.0 h1:bWz//6VYf/KtGJ4ysCYVAAjxDXkaWri6MzRwqJAfGVs=
21+
github.com/onsi/gomega v1.21.0/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
2022
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2123
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2224
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

internal/internal_integration/interrupt_and_timeout_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,27 @@ var _ = Describe("Interrupts and Timeouts", func() {
874874
})
875875
})
876876

877+
Describe("using timeouts with Gomega's Eventually", func() {
878+
BeforeEach(func(ctx SpecContext) {
879+
success, _ := RunFixture(CurrentSpecReport().LeafNodeText, func() {
880+
Context("container", func() {
881+
It("A", rt.TSC("A", func(c SpecContext) {
882+
Eventually(func() string {
883+
return "foo"
884+
}).WithTimeout(time.Hour).WithContext(c).Should(Equal("bar"))
885+
rt.Run("A-dont-see") //never see this because Eventually fails which panics and ends execution
886+
}), SpecTimeout(time.Millisecond*200))
887+
})
888+
})
889+
Ω(success).Should(Equal(false))
890+
}, NodeTimeout(time.Second))
891+
892+
It("doesn't get stuck because Eventually will exit", func() {
893+
Ω(rt).Should(HaveTracked("A"))
894+
Ω(reporter.Did.Find("A")).Should(HaveTimedOut())
895+
})
896+
})
897+
877898
Describe("when a suite timeout occurs", func() {
878899
BeforeEach(func(_ SpecContext) {
879900
conf.Timeout = time.Millisecond * 100

0 commit comments

Comments
 (0)