Skip to content

Commit

Permalink
add kubevirt images and config tests
Browse files Browse the repository at this point in the history
This change re-adds the kubevirt images and tests to the
machine-api-operator. They were removed to enable a backport to the 4.8
release branch, in which those images were not shipped. This changeset
sets things back to the status quo.

ref: openshift#873
  • Loading branch information
elmiko committed Jun 17, 2021
1 parent 9000c9f commit ed3eda8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Expand Up @@ -19,5 +19,6 @@ data:
"clusterAPIControllerAzure": "registry.svc.ci.openshift.org/openshift:azure-machine-controllers",
"clusterAPIControllerGCP": "registry.svc.ci.openshift.org/openshift:gcp-machine-controllers",
"clusterAPIControllerOvirt": "registry.svc.ci.openshift.org/openshift:ovirt-machine-controllers",
"clusterAPIControllerKubevirt": "registry.svc.ci.openshift.org/openshift:kubevirt-machine-controllers",
"clusterAPIControllerVSphere": "registry.svc.ci.openshift.org/openshift:machine-api-operator"
}
4 changes: 4 additions & 0 deletions install/image-references
Expand Up @@ -62,3 +62,7 @@ spec:
from:
kind: DockerImage
name: registry.svc.ci.openshift.org/openshift:ovirt-machine-controllers
- name: kubevirt-machine-controllers
from:
kind: DockerImage
name: registry.svc.ci.openshift.org/openshift:kubevirt-machine-controllers
8 changes: 8 additions & 0 deletions pkg/operator/config_test.go
Expand Up @@ -18,6 +18,7 @@ var (
expectedGCPImage = "quay.io/openshift/origin-gcp-machine-controllers:v4.0.0"
expectedOvirtImage = "quay.io/openshift/origin-ovirt-machine-controllers"
expectedVSphereImage = "docker.io/openshift/origin-machine-api-operator:v4.0.0"
expectedKubevirtImage = "quay.io/openshift/origin-kubevirt-machine-controllers"
)

func TestGetProviderFromInfrastructure(t *testing.T) {
Expand Down Expand Up @@ -164,6 +165,9 @@ func TestGetImagesFromJSONFile(t *testing.T) {
if img.ClusterAPIControllerVSphere != expectedVSphereImage {
t.Errorf("failed getImagesFromJSONFile. Expected: %s, got: %s", expectedVSphereImage, img.ClusterAPIControllerVSphere)
}
if img.ClusterAPIControllerKubevirt != expectedKubevirtImage {
t.Errorf("failed getImagesFromJSONFile. Expected: %s, got: %s", expectedKubevirtImage, img.ClusterAPIControllerKubevirt)
}
}

func TestGetProviderControllerFromImages(t *testing.T) {
Expand Down Expand Up @@ -210,6 +214,10 @@ func TestGetProviderControllerFromImages(t *testing.T) {
provider: configv1.OvirtPlatformType,
expectedImage: expectedOvirtImage,
},
{
provider: configv1.KubevirtPlatformType,
expectedImage: expectedKubevirtImage,
},
}

img, err := getImagesFromJSONFile(imagesJSONFile)
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/fixtures/images.json
Expand Up @@ -8,5 +8,6 @@
"clusterAPIControllerGCP": "quay.io/openshift/origin-gcp-machine-controllers:v4.0.0",
"clusterAPIControllerOvirt": "quay.io/openshift/origin-ovirt-machine-controllers",
"clusterAPIControllerVSphere": "docker.io/openshift/origin-machine-api-operator:v4.0.0",
"clusterAPIControllerKubevirt": "quay.io/openshift/origin-kubevirt-machine-controllers",
"kubeRBACProxy": "docker.io/openshift/origin-kube-rbac-proxy:v4.0.0"
}

0 comments on commit ed3eda8

Please sign in to comment.