lakeFS icon indicating copy to clipboard operation
lakeFS copied to clipboard

GS block adaptor tests use static port 4443

Open arielshaqed opened this issue 1 year ago • 2 comments

So if anything on your test machine already uses this port, the test panics:

panic: API error (500): driver failed programming external connectivity on endpoint eloquent_jones (0a24ef24bc8e27a31de5428d3016acda8c3347be277bcba8d670a4a050f774b8): Bind for 0.0.0.0:4443 failed: port is already allocated

goroutine 1 [running]:
github.com/treeverse/lakefs/pkg/block/gs_test.TestMain(0xc00008f168?)
	/home/ariels/dev/lakeFS/pkg/block/gs/main_test.go:58 +0xf1f
main.main()
	_testmain.go:55 +0x325
FAIL	github.com/treeverse/lakefs/pkg/block/gs	0.692s

It is never correct to bind to a port. Instead, use an ephemeral port and retrieve the bound port from Docker.

arielshaqed avatar Aug 07 '23 08:08 arielshaqed