working commit
This commit is contained in:
@@ -17,9 +17,8 @@ import (
|
||||
"time"
|
||||
|
||||
"mstore/app/server"
|
||||
"mstore/pkg/auxuuid"
|
||||
"mstore/pkg/client"
|
||||
"mstore/pkg/term"
|
||||
"mstore/pkg/terms"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -81,7 +80,7 @@ func TestAccountLife(t *testing.T) {
|
||||
username := "testuser"
|
||||
password := "testpass"
|
||||
|
||||
var accountID uint64
|
||||
var accountID string
|
||||
{
|
||||
// CreateAccount
|
||||
fmt.Printf("=== CreateAccount ===\n")
|
||||
@@ -92,7 +91,7 @@ func TestAccountLife(t *testing.T) {
|
||||
accountID, err = cli.CreateAccount(ctx, srvaddr, username, password)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
var grantID uint64
|
||||
var grantID string
|
||||
{
|
||||
// CreateGrant
|
||||
fmt.Printf("=== CreateGrant ===\n")
|
||||
@@ -100,7 +99,7 @@ func TestAccountLife(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
|
||||
|
||||
grantID, err = cli.CreateGrantByAccountID(ctx, srvaddr, accountID, term.RightReadAccounts, ".*")
|
||||
grantID, err = cli.CreateGrantByAccountID(ctx, srvaddr, accountID, terms.RightReadAccounts, ".*")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, len(grantID), 36)
|
||||
}
|
||||
@@ -121,7 +120,7 @@ func TestAccountLife(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
|
||||
|
||||
grantID, err = cli.CreateGrantByAccountID(ctx, srvaddr, accountID, term.RightWriteAccounts, ".*")
|
||||
grantID, err = cli.CreateGrantByAccountID(ctx, srvaddr, accountID, terms.RightWriteAccounts, ".*")
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, len(grantID), 36)
|
||||
fmt.Printf("grantID: %s\n", grantID)
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"mstore/app/server"
|
||||
"mstore/pkg/client"
|
||||
"mstore/pkg/term"
|
||||
"mstore/pkg/terms"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -133,7 +133,7 @@ func TestFileLife(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
|
||||
|
||||
files, err := cli.ListFiles(ctx, srvaddr+"/", term.AsFinePath)
|
||||
files, err := cli.ListFiles(ctx, srvaddr+"/", terms.AsFinePath)
|
||||
require.NoError(t, err)
|
||||
require.NotZero(t, len(files))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user