mirror of
https://github.com/containers/gvisor-tap-vsock.git
synced 2025-10-05 16:56:50 +08:00
gvproxy: command: Add AddServiceEndpoint
This adds GvproxyCommand.AddServiceEndpoint() for the newly added --services argument. This API is a helper for users of gvproxy to have a more convenient way to generate its command line. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
@@ -24,6 +24,7 @@ var _ = ginkgo.Describe("command-line format", func() {
|
||||
ginkgo.It("should convert Command to command line format", func() {
|
||||
command := types.NewGvproxyCommand()
|
||||
command.AddEndpoint("unix:///tmp/network.sock")
|
||||
command.AddServiceEndpoint("unix:///tmp/services.sock")
|
||||
command.Debug = true
|
||||
command.AddQemuSocket("tcp://0.0.0.0:1234")
|
||||
command.PidFile = "~/gv-pidfile.txt"
|
||||
@@ -33,6 +34,7 @@ var _ = ginkgo.Describe("command-line format", func() {
|
||||
cmd := command.ToCmdline()
|
||||
gomega.Expect(cmd).To(gomega.Equal([]string{
|
||||
"-listen", "unix:///tmp/network.sock",
|
||||
"-services", "unix:///tmp/services.sock",
|
||||
"-debug",
|
||||
"-mtu", "1500",
|
||||
"-ssh-port", "2222",
|
||||
|
Reference in New Issue
Block a user