chore: support configurable Go module proxy
This commit is contained in:
@@ -11,6 +11,7 @@ import sys
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--image", default="golang:1.25")
|
||||
parser.add_argument("--goproxy", default="", help="optional Go module proxy passed to the container")
|
||||
parser.add_argument("--duration", default="30m")
|
||||
parser.add_argument("--timeout", default="35m", help="go test timeout (default: 35m)")
|
||||
parser.add_argument("--gomaxprocs", type=int, default=2)
|
||||
@@ -27,6 +28,10 @@ def main() -> None:
|
||||
"-v", f"{root}:/workspace", "-w", "/workspace",
|
||||
"-e", "GOWORK=off", "-e", f"GOMAXPROCS={args.gomaxprocs}",
|
||||
"-e", f"GO_OMNI_HTTP2_SOAK_DURATION={args.duration}",
|
||||
]
|
||||
if args.goproxy:
|
||||
command += ["-e", f"GOPROXY={args.goproxy}"]
|
||||
command += [
|
||||
args.image, "go", "test", "-race", "-timeout", args.timeout, "./transport/http2",
|
||||
"-run", "^TestTLSSoak$", "-count=1",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user