etcd icon indicating copy to clipboard operation
etcd copied to clipboard

auth: Improve test coverage

Open barakmich opened this issue 11 years ago • 2 comments

barakmich avatar Apr 23 '15 18:04 barakmich

On windows, TestMergeUser was failing on the 5th cases due to the ordering of the roles:

 !reflect.DeepEqual(User{User: "foo", Roles: []string{"role1", "role2"}}, User{User: "foo", Roles: []string{"role2", "role1"}}

Is this an issue that needs to be fixed for users? Do we need to add an equals function to User? Should we change the slices to a data structure that does not depend on order?

apsanz avatar Apr 24 '15 13:04 apsanz

All done in the two PRs

barakmich avatar Jul 13 '15 18:07 barakmich