working commit

This commit is contained in:
2026-02-01 21:03:43 +02:00
parent 9c18f62997
commit 18e2a61c8a
10 changed files with 410 additions and 111 deletions
+8 -9
View File
@@ -9,14 +9,13 @@ import (
"testing"
"time"
"mstore/pkg/client"
"mstore/app/server"
"mstore/pkg/client"
"github.com/stretchr/testify/require"
)
func TestService(t *testing.T) {
func xxxTestService(t *testing.T) {
var srvport int64 = 10250
srvdir := t.TempDir()
srvaddr := fmt.Sprintf("127.0.0.1:%d", srvport)
@@ -74,13 +73,13 @@ func TestService(t *testing.T) {
err := os.WriteFile(tmpfile, filedata, 0666)
require.NoError(t, err)
//fmt.Printf("=== PutFile ===\n")
//cli := client.NewClient()
//ctx := context.Background()
//ctx, _ = context.WithTimeout(ctx, 1*time.Second)
fmt.Printf("=== PutFile ===\n")
cli := client.NewClient()
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
//err = cli.PutFile(ctx, tmpfile, srvaddr+"/foo.bin")
//require.NoError(t, err)
err = cli.PutFile(ctx, tmpfile, srvaddr+"/foo.bin")
require.NoError(t, err)
}
}