working commit

This commit is contained in:
2026-02-20 19:08:26 +02:00
parent f973293315
commit 3220e2d78f
32 changed files with 195 additions and 213 deletions
+6 -6
View File
@@ -18,8 +18,8 @@ import (
"mstore/app/server"
"mstore/pkg/client"
"mstore/pkg/terms"
"mstore/pkg/uuid"
"mstore/pkg/term"
"mstore/pkg/auxid"
"github.com/stretchr/testify/require"
@@ -81,7 +81,7 @@ func TestAccountLife(t *testing.T) {
username := "testuser"
password := "testpass"
var accountID uuid.UUID
var accountID uint64
{
// CreateAccount
fmt.Printf("=== CreateAccount ===\n")
@@ -92,7 +92,7 @@ func TestAccountLife(t *testing.T) {
accountID, err = cli.CreateAccount(ctx, srvaddr, username, password)
require.NoError(t, err)
}
var grantID uuid.UUID
var grantID uint64
{
// CreateGrant
fmt.Printf("=== CreateGrant ===\n")
@@ -100,7 +100,7 @@ func TestAccountLife(t *testing.T) {
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
grantID, err = cli.CreateGrantByAccountID(ctx, srvaddr, accountID, terms.RightReadAccounts, ".*")
grantID, err = cli.CreateGrantByAccountID(ctx, srvaddr, accountID, term.RightReadAccounts, ".*")
require.NoError(t, err)
require.Equal(t, len(grantID), 36)
}
@@ -121,7 +121,7 @@ func TestAccountLife(t *testing.T) {
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
grantID, err = cli.CreateGrantByAccountID(ctx, srvaddr, accountID, terms.RightWriteAccounts, ".*")
grantID, err = cli.CreateGrantByAccountID(ctx, srvaddr, accountID, term.RightWriteAccounts, ".*")
require.NoError(t, err)
require.Equal(t, len(grantID), 36)
fmt.Printf("grantID: %s\n", grantID)
+2 -2
View File
@@ -21,7 +21,7 @@ import (
"mstore/app/server"
"mstore/pkg/client"
"mstore/pkg/terms"
"mstore/pkg/term"
"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+"/", terms.AsFinePath)
files, err := cli.ListFiles(ctx, srvaddr+"/", term.AsFinePath)
require.NoError(t, err)
require.NotZero(t, len(files))
}