-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run unit tests on travis #56
Run unit tests on travis #56
Conversation
/hold |
4db52bd
to
12792f5
Compare
801a88b
to
6d0fc56
Compare
@phoracek Can you please take a look? /hold cancel |
6d0fc56
to
a1cba38
Compare
@@ -20,6 +20,9 @@ format: | |||
go vet ./pkg/... | |||
|
|||
test: | |||
hack/tests.sh | |||
|
|||
docker-test: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be the other way around - docker-test runs hack/tests.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
hack/tests.sh
Outdated
@@ -0,0 +1,42 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rename it to hack/test-dockerized.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
hack/tests.sh
Outdated
# Build the build container | ||
(cd ${DOCKER_DIR} && docker build . ${BUILD_QUIET} -t ${BUILDER}) | ||
|
||
docker run --rm -it --privileged --network host --cap-add ALL -v /lib/modules:/lib/modules -v `pwd`:/root/go/src/kubevirt.io/ovs-cni -w "/root/go/src/kubevirt.io/ovs-cni" kubevirt make docker-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does 'kubevirt' stands here for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the name from BUILDER variable change it to ${BUILDER} as is in the func-test-build file
@@ -4,4 +4,12 @@ set -o pipefail | |||
|
|||
source /etc/profile.d/gimme.sh | |||
export GOPATH="/root/go" | |||
|
|||
# launch OVS | |||
function quit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't like the fact that we use docker-builder to run tests, but i guess we can live with it if it saves us from another container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't think we need to create another container for that. I will be much more complex with volumes and mounts
a1cba38
to
bc31d90
Compare
pkg/plugin/plugin_test.go
Outdated
@@ -16,17 +16,16 @@ package plugin | |||
|
|||
import ( | |||
"fmt" | |||
"net" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should remain here
1386d9d
to
e9ccb4c
Compare
* unit tests are going to run on travis. * functional tests are going to run on STD-CI
e9ccb4c
to
b51a243
Compare
Great work @SchSeba! Thanks. Once it passes STD-CI, we can merge |
@phoracek Done the openshift is broken but it is unrelated to this PR |
This change is