working commit
This commit is contained in:
+18
-12
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user