Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

RFQT: More tests #170

Merged
merged 6 commits into from
Apr 16, 2020
Merged

RFQT: More tests #170

merged 6 commits into from
Apr 16, 2020

Conversation

steveklebanoff
Copy link
Contributor

Expands RFQ-T testing

  • Test for not returning an order when maker does not have allowances set
  • Test for skipValidation being default set to false
  • Test for skipValidation behaving as expected when set to true
  • Test for a bad API key being sent in

@@ -9,7 +9,7 @@
"noUnusedLocals": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": false,
"sourceMap": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed w/ @fragosti that this is cool, and is already being done in #168

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this so I can get proper TS-aware stack traces when tests fail

@steveklebanoff steveklebanoff mentioned this pull request Apr 15, 2020
2 tasks
@feuGeneA feuGeneA merged commit 11cb5a8 into rfqt Apr 16, 2020
@feuGeneA feuGeneA deleted the rfqt-expanded-tests branch April 16, 2020 00:30
feuGeneA added a commit that referenced this pull request Apr 16, 2020
* test: Stop running contract migrations

They're already deployed in the snapshot.  No need to deploy them
again.

* Add test of /swap/v0/quote endpoint

* Add and use RFQ-T configuration types

* yarn clean: separate docker from ts

* Only run prettier on ./src

To avoid trying to descend into docker-created folders, which are
root-access-only when running in a Linux environment.

* yarn add --dev make-promises-safe

Because it's used (in the mocha invocation) and wasn't present after
`yarn install`.

* Include prettier in lint

* Adapt to new RFQ-T namespace in SwapQuoterOpts

* Adapt to new RFQ-T namespace in SwapQuoterReqOpts

* Revert addition of env var defs to `yarn dev`

Addresses review comment #162 (comment)

* Don't enforce presence of taker address

Just pass the API key through to the maker.

Addresses review comment #162 (comment)

* Enforce a specific value for intentOnFilling

Addresses review comment #162 (comment)

* Remove unused apiKey parameter

Addresses review comment #162 (comment)

* Add `rfqt:` namespace for RFQ-T specific options

Addresses review comment #162 (comment)

* Parse RFQT environment variables as CSV, not JSON

Addresses review comment #162 (comment)

* Set RFQT taker address to Forwarder for ETH sales

Addresses review comment #162 (comment)

* Restore accidentally deleted line in recent commit.

Restoring a line that was accidentally deleted in 2578a79

Addresses review comment 2578a79#r406599327

* Add metadata for dummy kovan tokens

* introduce new test using rfqtMocker

* TEMPORARY: use gene's ganache snapshot for tests

* HACK: fix ganache-core bug

See open issue at
trufflesuite/ganache#465 (comment)

* TEMPORARY: Update gitpkg monorepo references

* Enable prettier for {.,test}/**/*.{ts,tsx,json,md}

Addresses review comment #162 (comment)

* Add SwapQuoteRequestParam `skipValidation`

Addresses review comments
#162 (comment)
and
#162 (comment)

* Add API Key and `intentOnFilling` to API schema

* Parse present but empty intentOnFilling as true

* Fix bug: env var csv split was wrongly applied

Addresses review comments
#162 (comment)
and
#162 (comment)

* RFQT: More tests (#170)

* generate source maps

* abstract tests out into nested contexts

* test for skipping validation

* dont include order for maker who does not have allowances set

* bad api key test

* fix test names and explicitly deposit so taker can fill

* Validate bool query params as enum, not presence

Addresses the following review comments:
- #162 (comment)
- #162 (comment)
- #162 (comment)

* Add comments around using Forwarder as Taker

Addresses review comment #162 (comment)

* Test no quote provided when taker address absent

* Revert "TEMPORARY: Update gitpkg monorepo references"

This reverts commit 08f4d31.

* Revert "TEMPORARY: use gene's ganache snapshot for tests"

This reverts commit 7c448d3.

* Pin updated monorepo deps to development revision

Pin to a gitpkg publish of the monorepo dependencies changed to support
this PR to a commit hash of the development branch, rather than that of
my PR branch.

* Pin tests' ganache snapshot to monorepo commit

I published a custom ganache image, with a monorepo commit hash appended
to the version number for reference.

* Simplify expressions parsing boolean query params

Co-authored-by: Steve Klebanoff <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants