Skip to content

Commit

Permalink
govcr with more general support for mutators (#46)
Browse files Browse the repository at this point in the history
* This is the start of somewhat of a re-write of govcr

Focus is emphasized on providing recording mutators and replay mutators.

The code is somewhat simplified and more cohesive.

* Add test-fixtures

* Removed debug messages

* Add comments and fixed matcher type definitions

* Linting

* Increase coverage of test function

* Add golangci config

* Improved code resilience on nil

* Reduced cyclomatic complexity

* Improved code resilience on nil

* Improved error message

* Update README.md

* Refined tests, fixed replay bug

* Renamed file

* Fixed errneous options

* Exports + ensure request not nil when creating track

* Cassette recording "mutaters"

* Add vcr transport concurrency test

* Long play (zip) cassettes

* Refactoring of DefaultRequestMatcher

Introduced RequestMatcher
Added tests

* Tests for DefaultBodyMatcher and DefaultTrailerMatcher

* Tests for TestRoundTrip_DefaultURLMatcher and bug fix

Also, linting

* Updated linters

* Changed TrackMutator from handler style to slice-based.

Also, extended test timeout from 5s to 10s (in Makefile)

* Moved WithTrackRecordingMutators from Cassette to PCB.

Also:
- extended test timeout from 10s to 15s (in Makefile)
- re-jigged packages

* Work on trackRecordingMutators + refactored tests

* Integrated trackRecordingMutators

* Renamed test function

* Linting and package organisation

* Updated README about v5 alpha

* Strengthened mutation replay test

* Use test suite for GoVCRWBTestSuite

Some lint fixes

* Various fixes and improvements

* add NewMethodURLRequestMatcher

* add TrackMutator and common mutator conditions

* additions around mutators and request matcher

added replaying mutators
added requestMatcher and trackReplayingMutators to VCRSettings
some re-arrangements around packages
added a number of Mutator helpers and predicates

* implement track replay mutation

* updated README

Co-authored-by: seborama <undisclosed>
  • Loading branch information
seborama authored Jul 31, 2022
1 parent 3842ef9 commit c4a765c
Show file tree
Hide file tree
Showing 55 changed files with 4,798 additions and 3,559 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Project-specific folders
/.idea
/.vscode
govcr-fixtures
temp-fixtures
# Project-specific files
*.swp
*.DS_Store
Expand Down
Loading

0 comments on commit c4a765c

Please sign in to comment.