Skip to content

Commit

Permalink
Use Docker instances of VoltDB for testing. (#29)
Browse files Browse the repository at this point in the history
* Change the test cases to query Docker for the port Volt is exposed on.
Change the ddl to tear down the test Volt schema before setting it up.
Change the run script to query Docker for the port Volt is exposed on.

* A few subtle changes in here but I think I've captured what you were after.

As far as getting a Volt instance setup and ready for testing against:

- It now defaults to starting a local Volt instance if it can't find a running Docker instance
- If it does find a running docker instance it will use that

On the testing side:

- You can configure the preferred way to run the tests, but it defaults to using a local instance
- You can override this by passing a cli option of -i docker to use docker.

(Having the tests automagically search for a usable Volt instance gives me the heebie jeebies a bit... I know I switch between projects a lot and am a bit apprehensive about the tests running against a wrong instance). Hopefully it now supporting both ways (via switches) is a usable compromise?

Some extra things...

Have begun to add some linting
Added nvm - minimum node version already quite out of date
Some naming hygiene
Run tests and lint from npm - still awkward but getting there

* Beginnings of a test to track down the "Trying to read beyond buffer length" error. Can only really guess what is triggering it given the sketchy details but the test case tries to replicate what is described in the #18 issue. (#28)

Also contains some experimental promise based wrappers around the call back style fns in VoltClient... plus an eslint config.

* A few subtle changes in here but I think I've captured what you were after.

As far as getting a Volt instance setup and ready for testing against:

- It now defaults to starting a local Volt instance if it can't find a running Docker instance
- If it does find a running docker instance it will use that

On the testing side:

- You can configure the preferred way to run the tests, but it defaults to using a local instance
- You can override this by passing a cli option of -i docker to use docker.

(Having the tests automagically search for a usable Volt instance gives me the heebie jeebies a bit... I know I switch between projects a lot and am a bit apprehensive about the tests running against a wrong instance). Hopefully it now supporting both ways (via switches) is a usable compromise?

Some extra things...

Have begun to add some linting
Added nvm - minimum node version already quite out of date
Some naming hygiene
Run tests and lint from npm - still awkward but getting there

* Fix: Order of statements in drop ddl
Fix: Missing test context in buffer test
Fix: Test for Volt docker instance in schema setup script

Change: Return default Volt port when no Docker container found running volt
  • Loading branch information
mattyouill authored and Ning Shi committed Dec 15, 2017
1 parent c9479ea commit 85745f5
Show file tree
Hide file tree
Showing 12 changed files with 2,971 additions and 695 deletions.
52 changes: 26 additions & 26 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
]
}
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"warn",
2
],
"linebreak-style": [
"warn",
"unix"
],
"quotes": [
"warn",
"double"
],
"semi": [
"error",
"always"
]
}
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.11.0
Loading

0 comments on commit 85745f5

Please sign in to comment.