diff options
author | Ian Gudger <igudger@google.com> | 2020-05-13 01:21:16 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-13 01:22:42 -0700 |
commit | e4058c03551d0d75beba0fe1553edd3195d966d8 (patch) | |
tree | 801c7b50ae3c45be945f5138ea39c283daa6d7b6 /test/packetimpact/testbench/dut.go | |
parent | 305f786e51ea2092c633d97b06818e59c5f40552 (diff) |
Replace test_runner.sh bash script with Go.
PiperOrigin-RevId: 311285868
Diffstat (limited to 'test/packetimpact/testbench/dut.go')
-rw-r--r-- | test/packetimpact/testbench/dut.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/packetimpact/testbench/dut.go b/test/packetimpact/testbench/dut.go index a78b7d7ee..b919a3c2e 100644 --- a/test/packetimpact/testbench/dut.go +++ b/test/packetimpact/testbench/dut.go @@ -16,6 +16,7 @@ package testbench import ( "context" + "flag" "net" "strconv" "syscall" @@ -37,6 +38,11 @@ type DUT struct { // NewDUT creates a new connection with the DUT over gRPC. func NewDUT(t *testing.T) DUT { + flag.Parse() + if err := genPseudoFlags(); err != nil { + t.Fatal("generating psuedo flags:", err) + } + posixServerAddress := POSIXServerIP + ":" + strconv.Itoa(POSIXServerPort) conn, err := grpc.Dial(posixServerAddress, grpc.WithInsecure(), grpc.WithKeepaliveParams(keepalive.ClientParameters{Timeout: RPCKeepalive})) if err != nil { |