Skip to content

Commit

Permalink
Address review comments #2
Browse files Browse the repository at this point in the history
  • Loading branch information
juadk committed Jan 19, 2024
1 parent 926661c commit 318ad62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/assets/cluster-airgap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ spec:
machineConfigRef:
apiVersion: elemental.cattle.io/v1beta1
kind: MachineInventorySelectorTemplate
name: selector-%CLUSTER_NAME%
name: pool-%CLUSTER_NAME%
quantity: 3
name: selector-master-%CLUSTER_NAME%
name: pool-master-%CLUSTER_NAME%
quantity: 0
unhealthyNodeTimeout: 0s
workerRole: true
machineSelectorConfig:
Expand Down
9 changes: 4 additions & 5 deletions tests/e2e/airgap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
)

var _ = Describe("E2E - Build the airgap archive", Label("prepare-archive"), func() {

It("Execute the script to build the archive", func() {
err := exec.Command("sudo", airgapBuildScript, k8sUpstreamVersion, certManagerVersion, rancherChannel, k8sVersion).Run()
Expect(err).To(Not(HaveOccurred()))
Expand All @@ -50,7 +49,7 @@ var _ = Describe("E2E - Deploy K3S/Rancher in airgap environment", Label("airgap
})

By("Downloading the qcow2 image from GCP storage", func() {
err := exec.Command("/opt/google-cloud-sdk/bin/gcloud", "storage", "cp", "gs://elemental-airgap-image/rancher-image.qcow2", "/home/gh-runner/rancher-image.qcow2").Run()
err := exec.Command("/opt/google-cloud-sdk/bin/gcloud", "storage", "cp", "gs://elemental-airgap-image/rancher-image.qcow2", os.Getenv("HOME")+"/rancher-image.qcow2").Run()
Expect(err).To(Not(HaveOccurred()))
})

Expand All @@ -59,7 +58,7 @@ var _ = Describe("E2E - Deploy K3S/Rancher in airgap environment", Label("airgap
"--name", "rancher-manager",
"--memory", "4096",
"--vcpus", "2",
"--disk", "path=/home/gh-runner/rancher-image.qcow2,bus=sata",
"--disk", "path="+os.Getenv("HOME")+"rancher-image.qcow2,bus=sata",
"--import",
"--os-variant", "opensuse-unknown",
"--network=default,mac=52:54:00:00:00:10",
Expand All @@ -78,7 +77,7 @@ var _ = Describe("E2E - Deploy K3S/Rancher in airgap environment", Label("airgap
}

// Get the version of the Elemental Operator
out, err := exec.Command("bash", "-c", "ls /opt/rancher/helm/elemental-operator-chart-*.tgz | cut -d '-' -f 4").CombinedOutput()
out, err := exec.Command("bash", "-c", "ls /opt/rancher/helm/elemental-operator-chart-*.tgz | cut -d '-' -f 4").Output()
Expect(err).To(Not(HaveOccurred()))
elementalVersion := strings.Trim(string(out), "\n")

Expand Down Expand Up @@ -165,7 +164,7 @@ var _ = Describe("E2E - Deploy K3S/Rancher in airgap environment", Label("airgap

By("Installing Rancher", func() {
// TODO: Use the DeployRancherManager function from install.go
rancherAirgapVersion, err := exec.Command("bash", "-c", "ls /opt/rancher/helm/rancher-*.tgz").CombinedOutput()
rancherAirgapVersion, err := exec.Command("bash", "-c", "ls /opt/rancher/helm/rancher-*.tgz").Output()
// Set flags for Rancher Manager installation
flags := []string{
"upgrade", "--install", "rancher", string(rancherAirgapVersion),
Expand Down

0 comments on commit 318ad62

Please sign in to comment.