39c2a55942
* port statediff from 9b7fd9af80/statediff/statediff.go
; minor fixes
* integrating state diff extracting, building, and persisting into geth processes
* work towards persisting created statediffs in ipfs; based off github.com/vulcanize/eth-block-extractor
* Add a state diff service
* Remove diff extractor from blockchain
* Update imports
* Move statediff on/off check to geth cmd config
* Update starting state diff service
* Add debugging logs for creating diff
* Add statediff extractor and builder tests and small refactoring
* Start to write statediff to a CSV
* Restructure statediff directory
* Pull CSV publishing methods into their own file
* Reformatting due to go fmt
* Add gomega to vendor dir
* Remove testing focuses
* Update statediff tests to use golang test pkg
instead of ginkgo
- builder_test
- extractor_test
- publisher_test
* Use hexutil.Encode instead of deprecated common.ToHex
* Remove OldValue from DiffBigInt and DiffUint64 fields
* Update builder test
* Remove old storage value from updated accounts
* Remove old values from created/deleted accounts
* Update publisher to account for only storing current account values
* Update service loop and fetching previous block
* Update testing
- remove statediff ginkgo test suite file
- move mocks to their own dir
* Updates per go fmt
* Updates to tests
* Pass statediff mode and path in through cli
* Return filename from publisher
* Remove some duplication in builder
* Remove code field from state diff output
this is the contract byte code, and it can still be obtained by querying
the db by the codeHash
* Consolidate acct diff structs for updated & updated/deleted accts
* Include block number in csv filename
* Clean up error logging
* Cleanup formatting, spelling, etc
* Address PR comments
* Add contract address and storage value to csv
* Refactor accumulating account row in csv publisher
* Add DiffStorage struct
* Add storage key to csv
* Address PR comments
* Fix publisher to include rows for accounts that don't have store updates
* Update builder test after merging in release/1.8
* Update test contract to include storage on contract intialization
- so that we're able to test that storage diffing works for created and
deleted accounts (not just updated accounts).
* Factor out a common trie iterator method in builder
5.8 KiB
5.8 KiB
1.4.3
Fixes:
- ensure file name and line numbers are correctly reported for XUnit [6fff58f]
- Fixed matcher for content-type (#305) [69d9b43]
1.4.2
Fixes:
- Add go.mod and go.sum files to define the gomega go module [f3de367, a085d30]
- Work around go vet issue with Go v1.11 (#300) [40dd6ad]
- Better output when using with go XUnit-style tests, fixes #255 (#297) [29a4b97]
- Fix MatchJSON fail to parse json.RawMessage (#298) [ae19f1b]
- show threshold in failure message of BeNumericallyMatcher (#293) [4bbecc8]
1.4.1
Fixes:
- Update documentation formatting and examples (#289) [9be8410]
- allow 'Receive' matcher to be used with concrete types (#286) [41673fd]
- Fix data race in ghttp server (#283) [7ac6b01]
- Travis badge should only show master [cc102ab]
1.4.0
Features
- Make string pretty diff user configurable (#273) [eb112ce, 649b44d]
Fixes
- Use httputil.DumpRequest to pretty-print unhandled requests (#278) [a4ff0fc, b7d1a52]
- fix typo floa32 > float32 (#272) [041ae3b, 6e33911]
- Fix link to documentation on adding your own matchers (#270) [bb2c830, fcebc62]
- Use setters and getters to avoid race condition (#262) [13057c3, a9c79f1]
- Avoid sending a signal if the process is not alive (#259) [b8043e5, 4fc1762]
- Improve message from AssignableToTypeOf when expected value is nil (#281) [9c1fb20]
1.3.0
Improvements:
- The
Equal
matcher matches byte slices more performantly. - Improved how
MatchError
matches error strings. MatchXML
ignores the order of xml node attributes.- Improve support for XUnit style golang tests. (#254)
Bug Fixes:
- Diff generation now handles multi-byte sequences correctly.
- Multiple goroutines can now call
gexec.Build
concurrently.
1.2.0
Improvements:
- Added
BeSent
which attempts to send a value down a channel and fails if the attempt blocks. Can be paired withEventually
to safely send a value down a channel with a timeout. Ω
,Expect
,Eventually
, andConsistently
now immediatelypanic
if 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
HavePrefix
andHaveSuffix
matchers. ghttp
can now handle concurrent requests.- Added
Succeed
which allows one to writeΩ(MyFunction()).Should(Succeed())
. - Improved
ghttp
's behavior around failing assertions and panics:- If a registered handler makes a failing assertion
ghttp
will return500
. - If a registered handler panics,
ghttp
will return500
and 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
ghttp
servers can take anio.Writer
.ghttp
will write a line to the writer when each request arrives.- Added
WithTransform
matcher to allow munging input data before feeding into the relevant matcher - Added boolean
And
,Or
, andNot
matchers to allow creating composite matchers - Added
gbytes.TimeoutCloser
,gbytes.TimeoutReader
, andgbytes.TimeoutWriter
- these are convenience wrappers that timeout if the underlying Closer/Reader/Writer does not return within the alloted time. - Added
gbytes.BufferReader
- this constructs agbytes.Buffer
that asynchronously reads the passed-inio.Reader
into its buffer.
Bug Fixes:
- gexec:
session.Wait
now usesEventuallyWithOffset
to get the right line number in the failure. ContainElement
no 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
Match
return failure messages, two new methodsFailureMessage
andNegatedFailureMessage
are 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
Say
matcher to perform ordered assertions against output data
- Provides a
gexec
: supports testing external processes- Provides support for building Go binaries
- Wraps and starts
exec.Cmd
commands - Makes it easy to assert against stdout and stderr
- Makes it easy to send signals and wait for processes to exit
- Provides an
Exit
matcher to assert against exit code.
DSL Changes:
Eventually
andConsistently
can accepttime.Duration
interval and polling inputs.- The default timeouts for
Eventually
andConsistently
are now configurable.
New Matchers:
ConsistOf
: order-independent assertion against the elements of an array/slice or keys of a map.BeTemporally
: likeBeNumerically
but fortime.Time
HaveKeyWithValue
: asserts a map has a given key with the given value.
Updated Matchers:
Receive
matcher 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{}) bool
can informEventually
and/orConsistently
when a match has no chance of changing status in the future. For example,Receive
returnsfalse
when a channel is closed.
Misc:
- Start using semantic versioning
- Start maintaining changelog
Major refactor:
- Pull out Gomega's internal to
internal