Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

porting tests from hand-rolled artisinal test-suite to mocha #793

Merged
merged 13 commits into from
Aug 15, 2015

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Aug 15, 2015

Note: this is a squashed version of https://github.com/NodeRedis/node_redis/tree/mocha-test-suite-no-grunt, since we're getting close to completing this task.

We're on the home stretch of the work being done for #778, I would love to get some eyeballs on this.

reviewers: @erinspice, @blainsmith

Erin Spiceland and others added 8 commits August 14, 2015 21:30
Add test for reconnect.

Run each test for both parsers and both IP versions.

Don't save a reference to this nodified assertion function.

Add DEBUG env var which enables extra debug logging in node_redis.

Remove Grunt, run Redis on 6378 for non-interference.

Remove the tests already ported to Mocha.

Port reconnect after pubsub test; add subscribed after reconnect test.

Reconnet after pubsub test confused me. I don't think it tested
anything, and it didn't pass for me after I ported it. I've disabled it
and added a note. In its place, I've added a test to make sure we are
still subscribed and can receive pubsub messages after a reconnect.

Move test suite config-like stuff into a library.

Move test suite createClient args generation into the config library.

WIP. Some select tests, most disabled and still WIP.
Move a miscategorized select test into the correct describe.
Fix error in organization of connection Mocha tests.

Clarify some test descriptions in 'set' Mocha tests.

Add some tests for mset.

Remove old 'set' tests.

Add some Mocha tests for 'get'.

Add tests for 'getset'.

Add tests for 'dbsize'.

Add 'flushdb' tests.

Add tests for 'incr'.
smoke test large list of commands

ported more tests to mocha, some slight cleanup in tests

move sinon and uuid to dev dependencies

finished porting eval tests over to mocha

rebased mocha testing branch with master

ported client and script tests

ported watch tests

ported detect_buffers tests

ported unref tests

ported auth tests over to mocha

ported idle and no_delay tests

ported hlen, hset

continuing marching forward

ported hincrby, sinter, sort, pubsub tests. improved logic in redis-process, I was still occasionally having issues where redis failed to exit.

switch back to default test command

ported del, exists, hlen, keys, randomkey, type

cleanup based on what I've learned so far from refactor. we now start and stop redis less often. moved tests to their final resting place

finished porting node_redis client tests

ported hgetall, mget, msetnx, rename, renamenx, setex, setnx

ported hgetall, mget, msetnx, rename, renamenx, setex, setnx

ported queue tests to mocha

amalgamated some of the helper logic

ported sadd, scard, sismember, srem, utf-8
@erinishimoticha
Copy link
Contributor

I love this so much. I will review it tomorrow.

@blainsmith
Copy link
Contributor

So awesome. I'll get my eyeballs on it later today.

// reconnect_select_db_after_pubsub
// Does not pass.
// "Connection in subscriber mode, only subscriber commands may be used"
xit("reconnects, unsubscribes, and can retrieve the pre-existing data", function (done) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is one I ported from the old suite. IIRC, it was formatted incorrectly in the old suite and was reporting passing when it should have been reporting failing. Does the description of this test describe behavior that should work, such that we need to enter an issue to fix the bug in node_redis, or is node_redis behaving as it should, such that we should delete this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going to try to get this one test working, just finishing porting the final methods first.

@blainsmith
Copy link
Contributor

Everything looks good to me. This will be a great addition.

@erinishimoticha
Copy link
Contributor

LGTM, too. Ship it!

@bcoe bcoe changed the title [WIP] porting tests from hand-rolled artisinal test-suite to mocha porting tests from hand-rolled artisinal test-suite to mocha Aug 15, 2015
bcoe added a commit that referenced this pull request Aug 15, 2015
porting tests from hand-rolled artisinal test-suite to mocha
@bcoe bcoe merged commit e2e507e into master Aug 15, 2015
@bcoe bcoe deleted the squash-mocha-work branch August 15, 2015 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants