working commit

This commit is contained in:
2026-02-12 17:03:17 +02:00
parent e4d9a6d161
commit 9b29364d6b
7 changed files with 76 additions and 29 deletions
+18 -12
View File
@@ -22,6 +22,7 @@ import (
"mstore/app/server"
"github.com/stretchr/testify/require"
"sigs.k8s.io/yaml"
)
func TestAccountLife(t *testing.T) {
@@ -95,21 +96,26 @@ func TestAccountLife(t *testing.T) {
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
_, err = cli.GetAccountByID(ctx, srvaddr, accountID)
accountDescr, err := cli.GetAccountByID(ctx, srvaddr, accountID)
require.NoError(t, err)
accountYAML, err := yaml.Marshal(accountDescr)
fmt.Printf("account:\n%s\n", string(accountYAML))
}
{
// ListAccounts
fmt.Printf("=== ListAccounts ===\n")
cli := NewClient()
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
accountDescrs, err := cli.ListAccounts(ctx, srvaddr+"/")
require.NoError(t, err)
require.NotZero(t, len(accountDescrs))
accountsYAML, err := yaml.Marshal(accountDescrs)
fmt.Printf("accounts:\n%s\n", string(accountsYAML))
}
/*
{
// ListAccounts
fmt.Printf("=== ListAccounts ===\n")
cli := NewClient()
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
files, err := cli.ListAccounts(ctx, srvaddr+"/")
require.NoError(t, err)
require.NotZero(t, len(files))
}
{
// DeleteAccount