chore: add id to resp of create storage

This commit is contained in:
Noah Hsu
2022-11-13 20:17:10 +08:00
parent 6e3df9f847
commit 3b6d8987db
6 changed files with 34 additions and 13 deletions

View File

@ -30,7 +30,7 @@ func TestCreateStorage(t *testing.T) {
{storage: model.Storage{Driver: "None", MountPath: "/none", Addition: `{"root_folder":"."}`}, isErr: true},
}
for _, storage := range storages {
err := op.CreateStorage(context.Background(), storage.storage)
_, err := op.CreateStorage(context.Background(), storage.storage)
if err != nil {
if !storage.isErr {
t.Errorf("failed to create storage: %+v", err)
@ -77,7 +77,7 @@ func setupStorages(t *testing.T) {
{Driver: "Local", MountPath: "/a/d/e.balance", Order: 4, Addition: `{"root_folder":"."}`},
}
for _, storage := range storages {
err := op.CreateStorage(context.Background(), storage)
_, err := op.CreateStorage(context.Background(), storage)
if err != nil {
t.Fatalf("failed to create storage: %+v", err)
}