working commit

This commit is contained in:
2026-02-11 20:48:56 +02:00
parent d318f39f3c
commit ae15bddb15
+3 -4
View File
@@ -35,7 +35,6 @@ func xxxTestFileOperations(t *testing.T) {
var srvport int64 = 10240 + rand.Int63n(1024) var srvport int64 = 10240 + rand.Int63n(1024)
srvdir := t.TempDir() srvdir := t.TempDir()
//srvaddr := fmt.Sprintf("127.0.0.1:%d", srvport)
filename := `bare.bin?abc=12` filename := `bare.bin?abc=12`
@@ -120,7 +119,7 @@ func xxxTestFileOperations(t *testing.T) {
fmt.Printf("Response body: %s\n", string(bodyBytes)) fmt.Printf("Response body: %s\n", string(bodyBytes))
} }
{ {
fmt.Printf("=== FileExists ===\n") fmt.Printf("=== FileInfo ===\n")
reqPath := filepath.Join(`/v3/api/file`, filename) reqPath := filepath.Join(`/v3/api/file`, filename)
routePath := `/v3/api/file/{filepath}` routePath := `/v3/api/file/{filepath}`
@@ -129,7 +128,7 @@ func xxxTestFileOperations(t *testing.T) {
hand := srv.Handler() hand := srv.Handler()
require.NotNil(t, hand) require.NotNil(t, hand)
rout.Head(routePath, hand.FileExists) rout.Head(routePath, hand.FileInfo)
request, err := http.NewRequest("HEAD", reqPath, nil) request, err := http.NewRequest("HEAD", reqPath, nil)
require.NoError(t, err) require.NoError(t, err)
@@ -206,7 +205,7 @@ func xxxTestFileOperations(t *testing.T) {
hand := srv.Handler() hand := srv.Handler()
require.NotNil(t, hand) require.NotNil(t, hand)
rout.Head(routePath, hand.FileExists) rout.Head(routePath, hand.FileInfo)
request, err := http.NewRequest("HEAD", reqPath, nil) request, err := http.NewRequest("HEAD", reqPath, nil)
require.NoError(t, err) require.NoError(t, err)