updating github.com/onsi/gomega to v1.5.0

This commit is contained in:
Davanum Srinivas
2019-06-14 11:20:57 -04:00
parent 8629f7fa25
commit 37479f975e
50 changed files with 55 additions and 71 deletions

View File

@@ -1,10 +1,9 @@
language: go
go:
- 1.9.x
- 1.10.x
- 1.11.x
- tip
- 1.12.x
env:
- GO111MODULE=on

View File

@@ -1,3 +1,14 @@
## 1.5.0
### Features
- Added MatchKeys matchers [8b909fc]
### Fixes and Minor Improvements
- Add type aliases to remove stuttering [03b0461]
- Don't run session_test.go on windows (#324) [5533ce8]
## 1.4.3
### Fixes:

View File

@@ -24,7 +24,7 @@ import (
"github.com/onsi/gomega/types"
)
const GOMEGA_VERSION = "1.4.3"
const GOMEGA_VERSION = "1.5.0"
const nilFailHandlerPanic = `You are trying to make an assertion, but Gomega's fail handler is nil.
If you're using Ginkgo then you probably forgot to put your assertion in an It().

View File

@@ -118,12 +118,7 @@ func (m *FieldsMatcher) matchFields(actual interface{}) (errs []error) {
return nil
}
var field interface{}
if val.Field(i).IsValid() {
field = val.Field(i).Interface()
} else {
field = reflect.Zero(typ.Field(i).Type)
}
field := val.Field(i).Interface()
match, err := matcher.Match(field)
if err != nil {

View File

@@ -77,9 +77,9 @@ func (m *KeysMatcher) matchKeys(actual interface{}) (errs []error) {
return nil
}
valValue := actualValue.MapIndex(keyValue)
valInterface := actualValue.MapIndex(keyValue).Interface()
match, err := matcher.Match(valValue.Interface())
match, err := matcher.Match(valInterface)
if err != nil {
return err
}
@@ -88,7 +88,7 @@ func (m *KeysMatcher) matchKeys(actual interface{}) (errs []error) {
if nesting, ok := matcher.(errorsutil.NestingMatcher); ok {
return errorsutil.AggregateError(nesting.Failures())
}
return errors.New(matcher.FailureMessage(valValue))
return errors.New(matcher.FailureMessage(valInterface))
}
return nil
}()