mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 09:51:36 +00:00
cmd/geth: cover attach header flag order in test
This commit is contained in:
parent
d1369b69f5
commit
d67337e0a7
1 changed files with 7 additions and 4 deletions
|
|
@ -42,10 +42,13 @@ func TestAttachWithHeaders(t *testing.T) {
|
|||
}
|
||||
port := ln.Addr().(*net.TCPAddr).Port
|
||||
testReceiveHeaders(t, ln, "attach", "-H", "first: one", "-H", "second: two", fmt.Sprintf("http://localhost:%d", port))
|
||||
// This way to do it fails due to flag ordering:
|
||||
//
|
||||
// testReceiveHeaders(t, ln, "-H", "first: one", "-H", "second: two", "attach", fmt.Sprintf("http://localhost:%d", port))
|
||||
// This is fixed in a follow-up PR.
|
||||
|
||||
ln, err = net.Listen("tcp", "localhost:0")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
port = ln.Addr().(*net.TCPAddr).Port
|
||||
testReceiveHeaders(t, ln, "-H", "first: one", "-H", "second: two", "attach", fmt.Sprintf("http://localhost:%d", port))
|
||||
}
|
||||
|
||||
// TestRemoteDbWithHeaders tests that 'geth db --remotedb' with custom headers works, i.e
|
||||
|
|
|
|||
Loading…
Reference in a new issue