feat(users): add roles APIs (#63)
* feat(kvstore): add namespace operations for bool * feat(userstore): add methods for roles * chore(multiusers): remove useless todo * feat(multiusers): add apis for roles * test(roles): add e2e tests for role APIs * test(e2e/files): enable files tests
This commit is contained in:
parent
4b6f6d9e1f
commit
9748d0cab4
10 changed files with 316 additions and 11 deletions
|
@ -15,6 +15,7 @@ func TestKVStoreProviders(t *testing.T) {
|
|||
var err error
|
||||
var ok bool
|
||||
key, boolV, intV, int64V, floatV, stringV := "key", true, 2027, int64(2027), 3.1415, "foobar"
|
||||
key2, boolV2 := "key2", false
|
||||
|
||||
kvstoreTest := func(store kvstore.IKVStore, t *testing.T) {
|
||||
// test bools
|
||||
|
@ -26,6 +27,19 @@ func TestKVStoreProviders(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Errorf("there should be no error %v", err)
|
||||
}
|
||||
err = store.SetBool(key2, boolV2)
|
||||
if err != nil {
|
||||
t.Errorf("there should be no error %v", err)
|
||||
}
|
||||
boolList, err := store.ListBools()
|
||||
if err != nil {
|
||||
t.Errorf("there should be no error %v", err)
|
||||
}
|
||||
if boolList[key] != boolV {
|
||||
t.Error("listBool incorrect val1")
|
||||
} else if boolList[key2] != boolV2 {
|
||||
t.Error("listBool incorrect val2")
|
||||
}
|
||||
boolVGot, ok := store.GetBool(key)
|
||||
if !ok {
|
||||
t.Error("value should exit")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue