mirror of https://github.com/Xhofe/alist
				
				
				
			chore: fix test typo
							parent
							
								
									303d245e0f
								
							
						
					
					
						commit
						e08810a12f
					
				| 
						 | 
					@ -2,6 +2,10 @@ package aria2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"context"
 | 
						"context"
 | 
				
			||||||
 | 
						"path/filepath"
 | 
				
			||||||
 | 
						"testing"
 | 
				
			||||||
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	_ "github.com/alist-org/alist/v3/drivers"
 | 
						_ "github.com/alist-org/alist/v3/drivers"
 | 
				
			||||||
	conf2 "github.com/alist-org/alist/v3/internal/conf"
 | 
						conf2 "github.com/alist-org/alist/v3/internal/conf"
 | 
				
			||||||
	"github.com/alist-org/alist/v3/internal/db"
 | 
						"github.com/alist-org/alist/v3/internal/db"
 | 
				
			||||||
| 
						 | 
					@ -10,9 +14,6 @@ import (
 | 
				
			||||||
	"github.com/alist-org/alist/v3/pkg/task"
 | 
						"github.com/alist-org/alist/v3/pkg/task"
 | 
				
			||||||
	"gorm.io/driver/sqlite"
 | 
						"gorm.io/driver/sqlite"
 | 
				
			||||||
	"gorm.io/gorm"
 | 
						"gorm.io/gorm"
 | 
				
			||||||
	"path/filepath"
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"time"
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func init() {
 | 
					func init() {
 | 
				
			||||||
| 
						 | 
					@ -30,7 +31,7 @@ func init() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestConnect(t *testing.T) {
 | 
					func TestConnect(t *testing.T) {
 | 
				
			||||||
	err := InitAria2Client("http://localhost:16800/jsonrpc", "secret", 3)
 | 
						_, err := InitAria2Client("http://localhost:16800/jsonrpc", "secret", 3)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		t.Errorf("failed to init aria2: %+v", err)
 | 
							t.Errorf("failed to init aria2: %+v", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,7 @@
 | 
				
			||||||
package db
 | 
					package db
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
 | 
						"github.com/alist-org/alist/v3/internal/errs"
 | 
				
			||||||
	"github.com/alist-org/alist/v3/internal/model"
 | 
						"github.com/alist-org/alist/v3/internal/model"
 | 
				
			||||||
	"github.com/pkg/errors"
 | 
						"github.com/pkg/errors"
 | 
				
			||||||
	"gorm.io/driver/sqlite"
 | 
						"gorm.io/driver/sqlite"
 | 
				
			||||||
| 
						 | 
					@ -51,7 +52,7 @@ func TestGetNearestMeta1(t *testing.T) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func TestGetNearestMeta2(t *testing.T) {
 | 
					func TestGetNearestMeta2(t *testing.T) {
 | 
				
			||||||
	meta, err := GetNearestMeta("/c/d/e")
 | 
						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 error: %+v", err)
 | 
				
			||||||
		t.Errorf("unexpected meta: %+v", meta)
 | 
							t.Errorf("unexpected meta: %+v", meta)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue