added beta file locker; updates tests

This commit is contained in:
2026-02-25 16:12:25 +02:00
parent d6d2721c88
commit 3cf01ae30b
5 changed files with 57 additions and 41 deletions
+7 -7
View File
@@ -72,7 +72,7 @@ func TestFileLife(t *testing.T) {
{
// ServiceHello
fmt.Printf("=== ServiceHello ===\n")
cli := client.NewClient()
cli := client.NewClient(true)
ctx := context.Background()
helloRes, err := cli.ServiceHello(ctx, srvaddr+"/hello", 1*time.Second)
require.NoError(t, err)
@@ -93,7 +93,7 @@ func TestFileLife(t *testing.T) {
require.NoError(t, err)
fmt.Printf("=== PutFile ===\n")
cli := client.NewClient()
cli := client.NewClient(true)
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
@@ -103,7 +103,7 @@ func TestFileLife(t *testing.T) {
{
// FileInfo
fmt.Printf("=== FileInfo ===\n")
cli := client.NewClient()
cli := client.NewClient(true)
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
@@ -115,7 +115,7 @@ func TestFileLife(t *testing.T) {
{
// GetFile
fmt.Printf("=== GetFile ===\n")
cli := client.NewClient()
cli := client.NewClient(true)
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
@@ -129,7 +129,7 @@ func TestFileLife(t *testing.T) {
{
// ListFiles
fmt.Printf("=== ListFiles ===\n")
cli := client.NewClient()
cli := client.NewClient(true)
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
@@ -140,7 +140,7 @@ func TestFileLife(t *testing.T) {
{
// DeleteFile
fmt.Printf("=== DeleteFile ===\n")
cli := client.NewClient()
cli := client.NewClient(true)
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)
@@ -150,7 +150,7 @@ func TestFileLife(t *testing.T) {
{
// !FileInfo
fmt.Printf("=== FileInfo ===\n")
cli := client.NewClient()
cli := client.NewClient(true)
ctx := context.Background()
ctx, _ = context.WithTimeout(ctx, 1*time.Second)