Skip to content
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

Merged
merged 1 commit into from Dec 6, 2018

Conversation

SchSeba
Copy link
Collaborator

@SchSeba SchSeba commented Dec 6, 2018

  • unit tests are going to run on travis.
  • functional tests are going to run on STD-CI

This change is Reviewable

@SchSeba
Copy link
Collaborator Author

SchSeba commented Dec 6, 2018

/hold

@kubevirt-bot kubevirt-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/S labels Dec 6, 2018
@SchSeba SchSeba force-pushed the create-func-tests branch 2 times, most recently from 4db52bd to 12792f5 Compare December 6, 2018 10:12
@kubevirt-bot kubevirt-bot added size/M and removed size/S labels Dec 6, 2018
@SchSeba SchSeba force-pushed the create-func-tests branch 23 times, most recently from 801a88b to 6d0fc56 Compare December 6, 2018 15:00
@SchSeba SchSeba changed the title [WIP] Fix unit and functional tests for the plugin Run unit tests on travis Dec 6, 2018
@SchSeba
Copy link
Collaborator Author

SchSeba commented Dec 6, 2018

@phoracek Can you please take a look?

/hold cancel

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 6, 2018
@SchSeba SchSeba requested a review from phoracek December 6, 2018 15:08
@@ -20,6 +20,9 @@ format:
go vet ./pkg/...

test:
hack/tests.sh

docker-test:
Copy link
Member

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

Copy link
Collaborator Author

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
Copy link
Member

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

Copy link
Collaborator Author

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
Copy link
Member

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?

Copy link
Collaborator Author

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 {
Copy link
Member

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

Copy link
Collaborator Author

@SchSeba SchSeba Dec 6, 2018

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

@@ -16,17 +16,16 @@ package plugin

import (
"fmt"
"net"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should remain here

@SchSeba SchSeba force-pushed the create-func-tests branch 2 times, most recently from 1386d9d to e9ccb4c Compare December 6, 2018 15:40
* unit tests are going to run on travis.
* functional tests are going to run on STD-CI
@phoracek
Copy link
Member

phoracek commented Dec 6, 2018

Great work @SchSeba! Thanks. Once it passes STD-CI, we can merge

@SchSeba
Copy link
Collaborator Author

SchSeba commented Dec 6, 2018

@phoracek Done the openshift is broken but it is unrelated to this PR

@phoracek phoracek merged commit e417ce3 into k8snetworkplumbingwg:master Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants