Skip to content

Commit

Permalink
chore: fix test typo
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jul 18, 2022
1 parent 303d245 commit e08810a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions internal/aria2/aria2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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() {
Expand All @@ -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)
}
Expand Down
3 changes: 2 additions & 1 deletion internal/db/meta_test.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit e08810a

Please sign in to comment.