Skip to content

Commit

Permalink
config: Add unit test
Browse files Browse the repository at this point in the history
This tests conversion of virtio devices to command line and then parsing
again the generated command line.
  • Loading branch information
cfergeau committed Mar 22, 2023
1 parent 1beb902 commit 120aacc
Show file tree
Hide file tree
Showing 4 changed files with 995 additions and 9 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
.PHONY: all build clean
.PHONY: all build clean test

CGO_CFLAGS=-mmacosx-version-min=11.0

all: build

build: out/vfkit

test:
go test ./pkg/...

clean:
rm -rf out

Expand Down
31 changes: 28 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,42 @@ go 1.17

require (
github.com/Code-Hex/vz/v3 v3.0.0
github.com/containers/gvisor-tap-vsock v0.5.0
github.com/docker/go-units v0.4.0
github.com/dustin/go-humanize v1.0.1
github.com/h2non/filetype v1.1.3
github.com/pkg/errors v0.9.1
github.com/prashantgupta24/mac-sleep-notifier v1.0.1
github.com/sirupsen/logrus v1.8.1
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
inet.af/tcpproxy v0.0.0-20210824174053-2e577fef49e2
github.com/stretchr/testify v1.8.1
golang.org/x/sync v0.1.0
inet.af/tcpproxy v0.0.0-20220326234310-be3ee21c9fa0
)

require (
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/insomniacslk/dhcp v0.0.0-20220504074936-1ca156eafb9f // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/linuxkit/virtsock v0.0.0-20220523201153-1a23e78aa7a2 // indirect
github.com/mdlayher/socket v0.4.0 // indirect
github.com/mdlayher/vsock v1.2.0 // indirect
github.com/miekg/dns v1.1.50 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/u-root/uio v0.0.0-20210528114334-82958018845c // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
golang.org/x/tools v0.4.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gvisor.dev/gvisor v0.0.0-20221216231429-a78e892a26d2 // indirect
)
Loading

0 comments on commit 120aacc

Please sign in to comment.