-
Notifications
You must be signed in to change notification settings - Fork 27
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
Enable running the ruby tests with alternate redis host/port #202
Conversation
Just wondering, why is this required? Because you can't inject the port? |
yeah, i was trying to run the test suite on spin where redis is on a non-standard port and the railgun host doesn't work |
ruby/test/support/redis_helper.rb
Outdated
@@ -0,0 +1,17 @@ | |||
# frozen_string_literal: true | |||
|
|||
module RedisHelper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about introducing a new concept here. Could we not just use REDIS_URL
which is $REDIS_HOST:$REDIS_PORT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, REDIS_URL
should have priority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REDIS_URL includes the database (which tends to be 0), where as the tests have been using 7.
If that isn't a concern i'm happy to switch to it.
Do we want to prefer REDIS_URL before HOST/PORT, or just use URL and drop support for HOST/PORT altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not a concern. Let's just go with REDIS_URL
only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still wondering if we need this abstraction at all if it's just a ENV.fetch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's still the default string being repeated but at this point we could inline it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
6e051cb
to
a773cfc
Compare
a773cfc
to
bab916b
Compare
Tests pass with
dev
on macs anddev test
works on spin (where redis is on a non-standard port and the railgun host does not exist).