mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 10:37:23 +01:00
test: pass --insecure-external-bind when the harness listens off loopback
blockmaster refuses a non-loopback --listen without it; a two-host run (SWBLOCK_TEST_LISTEN_HOST set) now passes it. Loopback runs are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
8083255487
commit
6f24d3bfbe
1 file changed
+7
-2
@@ -232,9 +232,14 @@ func headSzStartCluster(t *testing.T, prefix string, vols []headSzVol) (*handoff
|
||||
t.Fatal(err)
|
||||
}
|
||||
mstate := filepath.Join(h.dir, "master")
|
||||
master := h.start(t, "blockmaster", h.master, "--authority-store", filepath.Join(mstate, "authority"), "--lifecycle-store", filepath.Join(mstate, "lifecycle"),
|
||||
margs := []string{"--authority-store", filepath.Join(mstate, "authority"), "--lifecycle-store", filepath.Join(mstate, "lifecycle"),
|
||||
"--cluster-spec", specPath, "--expected-slots-per-volume", "1", "--listen", h.masterAddr,
|
||||
"--workspace-rpc", "--workspace-head-base-url", "http://"+env.cluster.filerHTTP+env.chunkPath)
|
||||
"--workspace-rpc", "--workspace-head-base-url", "http://" + env.cluster.filerHTTP + env.chunkPath}
|
||||
if testListenHost() != "127.0.0.1" {
|
||||
// a lab run spanning two hosts: blockmaster refuses a non-loopback listen without this
|
||||
margs = append(margs, "--insecure-external-bind")
|
||||
}
|
||||
master := h.start(t, "blockmaster", h.master, margs...)
|
||||
master.waitLog(t, 30*time.Second, "blockmaster: lock acquired, reloaded=")
|
||||
return env, clusterDir
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user