working commit

This commit is contained in:
2026-02-11 13:47:10 +02:00
parent 75bd5a952b
commit 2e3dbe8f7c
8 changed files with 101 additions and 25 deletions
+13 -1
View File
@@ -24,7 +24,7 @@ import (
"github.com/stretchr/testify/require"
)
func xxxTestFileLife(t *testing.T) {
func TestFileLife(t *testing.T) {
var srvport int64 = 10250
srvdir := t.TempDir()
srvaddr := fmt.Sprintf("127.0.0.1:%d", srvport)
@@ -119,6 +119,18 @@ func xxxTestFileLife(t *testing.T) {
require.NoError(t, err)
require.Equal(t, recsize, int64(filesize))
}
{
// ListFiles
fmt.Printf("=== ListFiles ===\n")
cli := NewClient()
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
files, err := cli.ListFiles(ctx, srvaddr+"/")
require.NoError(t, err)
require.NotZero(t, len(files))
}
{
// DeleteFile
fmt.Printf("=== DeleteFile ===\n")