Closed chiahuang closed 8 years ago
We have identified 6 test cases (not related to the new functions this PR addresses) that are failing. We will work on helping to get those fixed eventually once we have finished our todolist-redis implementation.
@chiahuang Overall it looks fairly good. A couple of comments:
Thanks for the feedback, @shmuelk! Those will be mostly simple changes. However, we were having trouble getting XCode to run the test cases (with a relative path password.txt file). How can we get XCode set up to find the password.txt file when we run the tests in the IDE?
@chiahuang, we should probably set you up with a Vagrant environment to test whether it works in Linux.
@rfdickerson We do not run tests in XCode. All tests are run by using swift build and swift test. You can also do a make test from within the Kitura-redis repository.
@chiahuang I guess I didn't explain myself quite so well in my previous comment.
What I was looking for in the style of the APIs is something as follows, using zrem as an example:
public func zrem(_ key: String, members: String..., callback: (Int?, error: NSError?) -> Void) { zremArrayOfMembers(key, members: members, callback: callback) }
public func zremArrayOfMembers(_ key: String, members: [String], callback: (Int?, error: NSError?) -> Void) { ... }
The idea is that there are a pair of functions, one that uses ellipses and one that uses an array. The function that uses he ellipses simply calls the one that uses the array. I would name them the same, but I have seen in the past compiler crashes in such cases.
@shmuelk Thanks, I have conform to the API style. If there is any problems, let me know.
@chiahuang The APIs now look great.
I have only one small comment on the tests. In the file Tests/SwiftRedis/TestSetCommands.swift on line 38, please remove authenticate: false
. Your code passes the tests only because a previous test case authenticate with the Redis server.
@chiahuang Thanks for fixing the tests.
But Why the dependency on Kitura-net? Please put the dependency back to Kitura-sys with a minor of 21.
Ah, so changing the Kitura-sys Package to use minor 21 will fix the problem? I believe we were using Kitura-sys 0.17 before and we were getting a dependency version conflict on the 'Kitura' package. We will make that change.
@chiahuang The correct minor for Kitura-sys is 21. If you are using this version of Kitura-redis, you should also be using Kitura with a minor of 21.
I'm going to merge this PR and then fix the Package.swift file
Description
Added additional Redis functions
Motivation and Context
Need these additional Redis functions to use them for another project
How Has This Been Tested?
Did unit testing on the additional Redis functions
Checklist: