Skip to content

Commit

Permalink
Merge pull request #25743 from bardielle/adding_kubevirt_provider
Browse files Browse the repository at this point in the history
add kubevirt as a provide to openshift tests
  • Loading branch information
mfojtik committed Dec 10, 2020
2 parents 7879890 + 1ec7c23 commit 9564382
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/openshift-tests/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import (
// Initialize ovirt as a provider
_ "github.com/openshift/origin/test/extended/util/ovirt"

// Initialize kubevirt as a provider
_ "github.com/openshift/origin/test/extended/util/kubevirt"

// these are loading important global flags that we need to get and set
_ "k8s.io/kubernetes/test/e2e"
_ "k8s.io/kubernetes/test/e2e/lifecycle"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/upgrade/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (t *UpgradeTest) Setup(f *framework.Framework) {
infra, err := configClient.ConfigV1().Infrastructures().Get(context.Background(), "cluster", metav1.GetOptions{})
framework.ExpectNoError(err)
// ovirt does not support service type loadbalancer because it doesn't program a cloud.
if infra.Status.PlatformStatus.Type == configv1.OvirtPlatformType {
if infra.Status.PlatformStatus.Type == configv1.OvirtPlatformType || infra.Status.PlatformStatus.Type == configv1.KubevirtPlatformType {
t.unsupportedPlatform = true
}
if t.unsupportedPlatform {
Expand Down
18 changes: 18 additions & 0 deletions test/extended/util/kubevirt/provider.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package kubevirt

import (
"k8s.io/kubernetes/test/e2e/framework"
)

func init() {
framework.RegisterProvider("kubevirt", newProvider)
}

func newProvider() (framework.ProviderInterface, error) {
return &Provider{}, nil
}

// Provider is a structure to handle kubevirt for e2e testing
type Provider struct {
framework.NullProvider
}

0 comments on commit 9564382

Please sign in to comment.