Skip to content

Commit

Permalink
David/1194 contract tests (#1462)
Browse files Browse the repository at this point in the history
* Refactor lcdClient.

Change class to function.
Give key methods their own namespace.
Rename key methods using JavaScript idioms.
Remove redundant generateSeed method because it is the equivalent of keys.get(`seed`)

* Add contract tests for /keys.

* Add note to CHANGELOG.

* Add LcdClient helper function tests back to improve coverage.

* Add more tests to lcdClient.spec to increase coverage.

* Remove redundant test from lcdClient.spec.

* Make separate keys.seed method in lcdClient.

* Improve lcdClient /keys tests.

* Add comments about Swagger middleware bug.
  • Loading branch information
NodeGuy authored and fedekunze committed Oct 20, 2018
1 parent 0ffcab8 commit c99bfc2
Show file tree
Hide file tree
Showing 15 changed files with 1,867 additions and 472 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

* Contract tests for `keys` endpoints in lcdClient. @NodeGuy
* Protected Gaia Lite process with a mutex to prevent locking error. @NodeGuy
* catching errors on cache encryption. @faboweb
* #1436 governance endpoints and vuex module @fedekunze
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ async function startLCD(home, nodeURL) {
})

// poll until LCD is started
let client = new LcdClient(`http://localhost:${LCD_PORT}`)
let client = LcdClient(axios, `http://localhost:${LCD_PORT}`)
while (true) {
try {
await client.listKeys()
await client.keys.values()
break // request succeeded
} catch (err) {
await sleep(1000)
Expand Down
Loading

0 comments on commit c99bfc2

Please sign in to comment.