-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add an Authoriser interface and use it to add mocks for testing #98
Conversation
I think this may be failing because of a bug in go-irodsclient; a first run of the tests fails, while subsequent runs on the same iRODS succeed and the incorrect values seem to be coming up from the go-irodsclient API. |
7aef239
to
3beb2f1
Compare
This wasn't the issue, although there is a bug in go-irodsclient because it reports a group as being a member of itself. |
f7c5d5e
to
0f5141d
Compare
The Authoriser interface implements a small subset of the go-irodsclient API sufficient to create mocks to emulate having users and groups from federated zones. go-irodsclient doesn't have full federation support, but nevertheless federated users are detected and reported by its API. The aim is to allow some level of testing against them without requiring a real federated iRODS servers. This commit also includes some refactoring to reduce the number of parameters used by some functions, particularly where user/group names and zones are being passed seperately, but are actually related.
0f5141d
to
f3a61f3
Compare
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.
Minor comment changes would be good (unless I've got them wrong of course). One of them is a comment I failed to update on a code change...
Quite keen test server stays off until actually used (possible when I fix-up #97 )
Co-authored-by: dkj <[email protected]>
Co-authored-by: dkj <[email protected]>
Co-authored-by: dkj <[email protected]>
Co-authored-by: dkj <[email protected]>
The Authoriser interface implements a small subset of the go-irodsclient API sufficient to create mocks to emulate having users and groups from federated zones.
go-irodsclient doesn't have full federation support, but nevertheless federated users are detected and reported by its API. The aim is to allow some level of testing against them without requiring a real federated iRODS servers.
This commit also includes some refactoring to reduce the number of parameters used by some functions, particularly where user/group names and zones are being passed seperately, but are actually related.