Change made by: - running "gvt fetch" on each of the packages mentioned in Godeps/Godeps.json - `rm -rf Godeps` - tweaking the build scripts to not mention Godeps - tweaking the build scripts to test `./lib/...`, `./cmd/...` explicitly (to avoid testing vendor) - tweaking the build scripts to not juggle GOPATH for Godeps and instead set GO15VENDOREXPERIMENT. This also results in some updated packages at the same time I bet. Building with Go 1.3 and 1.4 still *works* but won't use our vendored dependencies - the user needs to have the actual packages in their GOPATH then, which they'll get with a normal "go get". Building with Go 1.6+ will get our vendored dependencies by default even when not using our build script, which is nice. By doing this we gain some freedom in that we can pick and choose manually what to include in vendor, as it's not based on just dependency analysis of our own code. This is also a risk as we might pick up dependencies we are unaware of, as the build may work locally with those packages present in GOPATH. On the other hand the build server will detect this as it has no packages in it's GOPATH beyond what is included in the repo. Recommended tool to manage dependencies is github.com/FiloSottile/gvt.
3.7 KiB
3.7 KiB
HEAD
Improvements:
- Added
BeSentwhich attempts to send a value down a channel and fails if the attempt blocks. Can be paired withEventuallyto safely send a value down a channel with a timeout. Ω,Expect,Eventually, andConsistentlynow immediatelypanicif there is no registered fail handler. This is always a mistake that can hide failing tests.Receive()no longer errors when passed a closed channel, it's perfectly fine to attempt to read from a closed channel so Ω(c).Should(Receive()) always fails and Ω(c).ShoudlNot(Receive()) always passes with a closed channel.- Added
HavePrefixandHaveSuffixmatchers. ghttpcan now handle concurrent requests.- Added
Succeedwhich allows one to writeΩ(MyFunction()).Should(Succeed()). - Improved
ghttp's behavior around failing assertions and panics:- If a registered handler makes a failing assertion
ghttpwill return500. - If a registered handler panics,
ghttpwill return500and fail the test. This is new behavior that may cause existing code to break. This code is almost certainly incorrect and creating a false positive.
- If a registered handler makes a failing assertion
ghttpservers can take anio.Writer.ghttpwill write a line to the writer when each request arrives.- Added
WithTransformmatcher to allow munging input data before feeding into the relevant matcher - Added boolean
And,Or, andNotmatchers to allow creating composite matchers
Bug Fixes:
- gexec:
session.Waitnow usesEventuallyWithOffsetto get the right line number in the failure. ContainElementno longer bails if a passed-in matcher errors.
1.0 (8/2/2014)
No changes. Dropping "beta" from the version number.
1.0.0-beta (7/8/2014)
Breaking Changes:
- Changed OmegaMatcher interface. Instead of having
Matchreturn failure messages, two new methodsFailureMessageandNegatedFailureMessageare called instead. - Moved and renamed OmegaFailHandler to types.GomegaFailHandler and OmegaMatcher to types.GomegaMatcher. Any references to OmegaMatcher in any custom matchers will need to be changed to point to types.GomegaMatcher
New Test-Support Features:
ghttp: supports testing http clients- Provides a flexible fake http server
- Provides a collection of chainable http handlers that perform assertions.
gbytes: supports making ordered assertions against streams of data- Provides a
gbytes.Buffer - Provides a
Saymatcher to perform ordered assertions against output data
- Provides a
gexec: supports testing external processes- Provides support for building Go binaries
- Wraps and starts
exec.Cmdcommands - Makes it easy to assert against stdout and stderr
- Makes it easy to send signals and wait for processes to exit
- Provides an
Exitmatcher to assert against exit code.
DSL Changes:
EventuallyandConsistentlycan accepttime.Durationinterval and polling inputs.- The default timeouts for
EventuallyandConsistentlyare now configurable.
New Matchers:
ConsistOf: order-independent assertion against the elements of an array/slice or keys of a map.BeTemporally: likeBeNumericallybut fortime.TimeHaveKeyWithValue: asserts a map has a given key with the given value.
Updated Matchers:
Receivematcher can take a matcher as an argument and passes only if the channel under test receives an objet that satisfies the passed-in matcher.- Matchers that implement
MatchMayChangeInTheFuture(actual interface{}) boolcan informEventuallyand/orConsistentlywhen a match has no chance of changing status in the future. For example,Receivereturnsfalsewhen a channel is closed.
Misc:
- Start using semantic versioning
- Start maintaining changelog
Major refactor:
- Pull out Gomega's internal to
internal