Skip to content

Commit

Permalink
bump gomega and validate integration with Gomega with SpecContext
Browse files Browse the repository at this point in the history
  • Loading branch information
onsi committed Oct 6, 2022
1 parent 5915214 commit 6ee15dc
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
8 changes: 7 additions & 1 deletion RELEASING.md
@@ -1,7 +1,13 @@
A Ginkgo release is a tagged git sha and a GitHub release. To cut a release:

1. Ensure CHANGELOG.md is up to date.
- Use `git log --pretty=format:'- %s [%h]' HEAD...vX.X.X` to list all the commits since the last release
- Use
```bash
LAST_VERSION=$(git tag --sort=version:refname | tail -n1)
CHANGES=$(git log --pretty=format:'- %s [%h]' HEAD...$LAST_VERSION)
echo -e "## NEXT\n\n$CHANGES\n\n### Features\n\n## Fixes\n\n## Maintenance\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
```
to update the changelog
- Categorize the changes into
- Breaking Changes (requires a major version)
- New Features (minor version)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38
github.com/onsi/gomega v1.20.2
github.com/onsi/gomega v1.21.0
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f
golang.org/x/tools v0.1.12
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Expand Up @@ -17,6 +17,8 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/onsi/gomega v1.20.2 h1:8uQq0zMgLEfa0vRrrBgaJF2gyW9Da9BmfGV+OyUzfkY=
github.com/onsi/gomega v1.20.2/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
github.com/onsi/gomega v1.21.0 h1:bWz//6VYf/KtGJ4ysCYVAAjxDXkaWri6MzRwqJAfGVs=
github.com/onsi/gomega v1.21.0/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
21 changes: 21 additions & 0 deletions internal/internal_integration/interrupt_and_timeout_test.go
Expand Up @@ -874,6 +874,27 @@ var _ = Describe("Interrupts and Timeouts", func() {
})
})

Describe("using timeouts with Gomega's Eventually", func() {
BeforeEach(func(ctx SpecContext) {
success, _ := RunFixture(CurrentSpecReport().LeafNodeText, func() {
Context("container", func() {
It("A", rt.TSC("A", func(c SpecContext) {
Eventually(func() string {
return "foo"
}).WithTimeout(time.Hour).WithContext(c).Should(Equal("bar"))
rt.Run("A-dont-see") //never see this because Eventually fails which panics and ends execution
}), SpecTimeout(time.Millisecond*200))
})
})
Ω(success).Should(Equal(false))
}, NodeTimeout(time.Second))

It("doesn't get stuck because Eventually will exit", func() {
Ω(rt).Should(HaveTracked("A"))
Ω(reporter.Did.Find("A")).Should(HaveTimedOut())
})
})

Describe("when a suite timeout occurs", func() {
BeforeEach(func(_ SpecContext) {
conf.Timeout = time.Millisecond * 100
Expand Down

0 comments on commit 6ee15dc

Please sign in to comment.