Skip to content

Commit

Permalink
Merge pull request kubevirt#2440 from davidvossel/release-func-test
Browse files Browse the repository at this point in the history
Release Update Functional Test
  • Loading branch information
rmohr authored Jul 2, 2019
2 parents de14bca + 744b2d9 commit 452de12
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 3 deletions.
14 changes: 13 additions & 1 deletion hack/functests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,22 @@ DOCKER_TAG_ALT=${DOCKER_TAG_ALT:-devel_alt}
source hack/common.sh
source hack/config.sh

# This git command returns the most recent tag created in a specific branch
# Example: if working in the release-0.17 branch, it will return v0.17.2 (or whatever the latest tag is today in release-0.17)
# Example: if working in master, it will return v0.18.0 (or whatever the latest tag is today)
#
# These git tags happen to correspond exactly to our container tags, so the convention works well
# for determining the release we should be testing updates with.
_default_previous_release_tag=$(git describe --tags --abbrev=0 "$(git rev-parse HEAD)")
_default_previous_release_registry="index.docker.io/kubevirt"

previous_release_tag=${PREVIOUS_RELEASE_TAG:-$_default_previous_release_tag}
previous_release_registry=${PREVIOUS_RELEASE_REGISTRY:-$_default_previous_release_registry}

functest_docker_prefix=${manifest_docker_prefix-${docker_prefix}}

if [[ ${TARGET} == openshift* ]]; then
oc=${kubectl}
fi

${TESTS_OUT_DIR}/tests.test -kubeconfig=${kubeconfig} -container-tag=${docker_tag} -container-tag-alt=${docker_tag_alt} -container-prefix=${functest_docker_prefix} -oc-path=${oc} -kubectl-path=${kubectl} -test.timeout 300m ${FUNC_TEST_ARGS} -installed-namespace=${namespace}
${TESTS_OUT_DIR}/tests.test -kubeconfig=${kubeconfig} -container-tag=${docker_tag} -container-tag-alt=${docker_tag_alt} -container-prefix=${functest_docker_prefix} -oc-path=${oc} -kubectl-path=${kubectl} -test.timeout 300m ${FUNC_TEST_ARGS} -installed-namespace=${namespace} -previous-release-tag=${previous_release_tag} -previous-release-registry=${previous_release_registry}
2 changes: 2 additions & 0 deletions manifests/generated/rbac-cluster.authorization.k8s.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ rules:
- virtualmachines/restart
verbs:
- update
- put
- apiGroups:
- kubevirt.io
resources:
Expand Down Expand Up @@ -101,6 +102,7 @@ rules:
- virtualmachines/restart
verbs:
- update
- put
- apiGroups:
- kubevirt.io
resources:
Expand Down
2 changes: 2 additions & 0 deletions manifests/generated/rbac-operator.authorization.k8s.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ rules:
- virtualmachines/restart
verbs:
- update
- put
- apiGroups:
- kubevirt.io
resources:
Expand Down Expand Up @@ -368,6 +369,7 @@ rules:
- virtualmachines/restart
verbs:
- update
- put
- apiGroups:
- kubevirt.io
resources:
Expand Down
2 changes: 2 additions & 0 deletions pkg/virt-operator/creation/rbac/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func newAdminClusterRole() *rbacv1.ClusterRole {
},
Verbs: []string{
"update",
"put",
},
},
{
Expand Down Expand Up @@ -197,6 +198,7 @@ func newEditClusterRole() *rbacv1.ClusterRole {
},
Verbs: []string{
"update",
"put",
},
},
{
Expand Down
1 change: 1 addition & 0 deletions tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ go_test(
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/networking/v1:go_default_library",
"//vendor/k8s.io/api/policy/v1beta1:go_default_library",
"//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
Expand Down
Loading

0 comments on commit 452de12

Please sign in to comment.