Added deprecation notice for the feature hooks

Этот коммит содержится в:
Fredrik Lönnblad 2020-03-09 13:53:16 -03:00
родитель 388a0e267e
коммит bc57207416
4 изменённых файлов: 33 добавлений и 9 удалений

6
go.mod
Просмотреть файл

@ -3,7 +3,9 @@ module github.com/cucumber/godog
go 1.13
require (
github.com/DATA-DOG/go-txdb v0.1.3
github.com/go-sql-driver/mysql v1.5.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/pretty v0.2.0 // indirect
github.com/stretchr/testify v1.4.0
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.2.7 // indirect
)

15
go.sum
Просмотреть файл

@ -1,9 +1,12 @@
github.com/DATA-DOG/go-txdb v0.1.3 h1:R4v6OuOcy2O147e2zHxU0B4NDtF+INb5R9q/CV7AEMg=
github.com/DATA-DOG/go-txdb v0.1.3/go.mod h1:DhAhxMXZpUJVGnT+p9IbzJoRKvlArO2pkHjnGX7o0n0=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
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=
@ -11,5 +14,9 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

Просмотреть файл

@ -1,17 +1,17 @@
I am excited to announce the release of godog v0.9.0.
Here follows a summary of notable changes, and the non backward compatible changes.
Here follows a summary of Notable Changes, the Non Backward Compatible Changes and Deprecation Notices.
The full change log is available [here](https://github.com/cucumber/godog/blob/master/CHANGELOG.md).
Notable Changes
----------------
---------------
Most importantly, note that the gherkin core is changed to [gherkin-go](https://github.com/cucumber/gherkin-go/releases/tag/v9.2.0).
Non backward compatible changes
Non Backward Compatible Changes
-------------------------------
### Install godog
@ -70,6 +70,14 @@ The formatter interface have recieved some updates, the updated version can be f
- `Defined`, `Failed`, `Passed`, `Skipped`, `Undefined`, `Pending` now takes `*messages.Pickle` as the first argument and `*gherkin.Step, *StepDef` have been updated to `*messages.Pickle_PickleStep, *StepDefinition`
Deprecation Notices
-------------------
### Hooks
- `BeforeFeature` and `AfterFeature` hooks are now considered deprecated and will be removed in `v0.10.0`.
Full change log
---------------

Просмотреть файл

@ -200,6 +200,9 @@ func (s *Suite) BeforeSuite(fn func()) {
// scenario to restart it.
//
// Use it wisely and avoid sharing state between scenarios.
//
// Deprecated: BeforeFeature will be removed. Depending on
// your usecase, do setup in BeforeSuite or BeforeScenario.
func (s *Suite) BeforeFeature(fn func(*gherkin.Feature)) {
s.beforeFeatureHandlers = append(s.beforeFeatureHandlers, fn)
}
@ -247,6 +250,10 @@ func (s *Suite) AfterScenario(fn func(interface{}, error)) {
// AfterFeature registers a function or method
// to be run once after feature executed all scenarios.
//
// Deprecated: AfterFeature will be removed. Depending on
// your usecase, do cleanup and teardowns in AfterScenario
// or AfterSuite.
func (s *Suite) AfterFeature(fn func(*gherkin.Feature)) {
s.afterFeatureHandlers = append(s.afterFeatureHandlers, fn)
}