chore: fix test typo

refactor/fs
Noah Hsu 2022-07-18 11:37:53 +08:00
parent 303d245e0f
commit e08810a12f
2 changed files with 7 additions and 5 deletions

View File

@ -2,6 +2,10 @@ package aria2
import (
"context"
"path/filepath"
"testing"
"time"
_ "github.com/alist-org/alist/v3/drivers"
conf2 "github.com/alist-org/alist/v3/internal/conf"
"github.com/alist-org/alist/v3/internal/db"
@ -10,9 +14,6 @@ import (
"github.com/alist-org/alist/v3/pkg/task"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"path/filepath"
"testing"
"time"
)
func init() {
@ -30,7 +31,7 @@ func init() {
}
func TestConnect(t *testing.T) {
err := InitAria2Client("http://localhost:16800/jsonrpc", "secret", 3)
_, err := InitAria2Client("http://localhost:16800/jsonrpc", "secret", 3)
if err != nil {
t.Errorf("failed to init aria2: %+v", err)
}

View File

@ -1,6 +1,7 @@
package db
import (
"github.com/alist-org/alist/v3/internal/errs"
"github.com/alist-org/alist/v3/internal/model"
"github.com/pkg/errors"
"gorm.io/driver/sqlite"
@ -51,7 +52,7 @@ func TestGetNearestMeta1(t *testing.T) {
func TestGetNearestMeta2(t *testing.T) {
meta, err := GetNearestMeta("/c/d/e")
if errors.Cause(err) != ErrMetaNotFound {
if errors.Cause(err) != errs.MetaNotFound {
t.Errorf("unexpected error: %+v", err)
t.Errorf("unexpected meta: %+v", meta)
}