File tree Expand file tree Collapse file tree 5 files changed +12
-3
lines changed
Expand file tree Collapse file tree 5 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 5656
5757 - run :
5858 name : Run all tests
59- command : cargo test --features experimental-api --all
59+ command : cargo test --features test, experimental-api --all-targets
Original file line number Diff line number Diff line change @@ -36,3 +36,7 @@ cc = "1.0"
3636default = []
3737experimental-api = []
3838
39+ # Workaround to allow cfg(feature = "test") in dependencies:
40+ # https://github.com/rust-lang/rust/issues/59168#issuecomment-472653680
41+ # This requires running the tests with `--features test`
42+ test = []
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+ cargo build --features experimental-api --all --all-targets
3+
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ impl Context {
5757 }
5858
5959 pub fn is_keys_position_request ( & self ) -> bool {
60- // HACK: Used for tests, where the context is null
61- if self . ctx . is_null ( ) {
60+ // We want this to be available in tests where we don't have an actual Redis to call
61+ if cfg ! ( feature = "test" ) {
6262 return false ;
6363 }
6464
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+ cargo test --all-targets --features test,experimental-api
You can’t perform that action at this time.
0 commit comments