add coverage to plugin
This commit is contained in:
1 parent
254be128b0
commit
718e93bd23
5 files changed
+27
-10
No files matched your search
@@ -4,12 +4,19 @@
|
||||
|
||||
start_suite "Test CNI plugin"
|
||||
|
||||
coverage_args() {
|
||||
# no coverage reporting for now; but when the plugin binary has
|
||||
# been built for coverage reporting we need to prevent it from
|
||||
# complaining about the non-coverage args.
|
||||
[ -n "$COVERAGE" ] && echo "--"
|
||||
}
|
||||
|
||||
cni_connect() {
|
||||
pid=$(container_pid $1 $2)
|
||||
docker_on $1 run --rm --privileged --net=host --pid=host -i \
|
||||
-e CNI_VERSION=1 -e CNI_COMMAND=ADD -e CNI_CONTAINERID=c1 \
|
||||
-e CNI_NETNS=/proc/$pid/ns/net -e CNI_IFNAME=eth0 -e CNI_PATH=/opt/cni/bin \
|
||||
weaveworks/plugin:latest --cni-net <<EOF
|
||||
weaveworks/plugin:latest $(coverage_args) --cni-net <<EOF
|
||||
{
|
||||
"name": "weave",
|
||||
"type": "weave-net"
|
||||
|
||||
Reference in new issue
Block a user