feat: obj list api

This commit is contained in:
Noah Hsu
2022-06-27 19:51:23 +08:00
parent c6007aa9e6
commit 7c0b86a9cd
10 changed files with 157 additions and 24 deletions

View File

@ -25,9 +25,9 @@ func TestCreateAccount(t *testing.T) {
account model.Account
iserr bool
}{
{account: model.Account{Driver: "Local", VirtualPath: "/local", Addition: "{}"}, iserr: false},
{account: model.Account{Driver: "Local", VirtualPath: "/local", Addition: "{}"}, iserr: true},
{account: model.Account{Driver: "None", VirtualPath: "/none", Addition: "{}"}, iserr: true},
{account: model.Account{Driver: "Local", VirtualPath: "/local", Addition: `{"root_folder":"."}`}, iserr: false},
{account: model.Account{Driver: "Local", VirtualPath: "/local", Addition: `{"root_folder":"."}`}, iserr: true},
{account: model.Account{Driver: "None", VirtualPath: "/none", Addition: `{"root_folder":"."}`}, iserr: true},
}
for _, account := range accounts {
err := operations.CreateAccount(context.Background(), account.account)