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

CI/UI - Bump to Rancher 2.10 #85

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ui-e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow calls the master E2E workflow with custom variables
name: UI-E2E
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Rancher-`{0}` - `{1}` destroy={2}', inputs.rancher_version, inputs.grep_test_by_tag, inputs.destroy_runner) || github.event_name == 'schedule' && 'UI-E2E on Rancher-latest/devel/2.9' }}
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Rancher-`{0}` - `{1}` destroy={2}', inputs.rancher_version, inputs.grep_test_by_tag, inputs.destroy_runner) || github.event_name == 'schedule' && 'UI-E2E on Rancher-latest/devel/2.10' }}

on:
workflow_dispatch:
Expand All @@ -15,7 +15,7 @@ on:
type: boolean
rancher_version:
description: Rancher Manager channel/version/head_version to use for installation
default: latest/devel/2.9
default: latest/devel/2.10
type: string
grep_test_by_tag:
description: Grep tags. For multiple selection separate with spaces. Keep always @install
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
cluster_name: cluster-k3s
destroy_runner: ${{ github.event_name == 'schedule' && true || inputs.destroy_runner }}
capi_ui_version: dev
rancher_version: ${{ inputs.rancher_version || 'latest/devel/2.9' }}
rancher_version: ${{ inputs.rancher_version || 'latest/devel/2.10' }}
qase_run_id: ${{ inputs.qase_run_id || 'auto' }}
grep_test_by_tag: ${{ inputs.grep_test_by_tag || '@install @short' }}

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# rancher-turtles-e2e

[![UI-E2E_head_2.9](https://github.com/rancher-sandbox/rancher-turtles-e2e/actions/workflows/ui-e2e.yaml/badge.svg?branch=main)](https://github.com/rancher-sandbox/rancher-turtles-e2e/actions/workflows/ui-e2e.yaml)
[![UI-E2E_head_2.10](https://github.com/rancher-sandbox/rancher-turtles-e2e/actions/workflows/ui-e2e.yaml/badge.svg?branch=main)](https://github.com/rancher-sandbox/rancher-turtles-e2e/actions/workflows/ui-e2e.yaml)

What tests are doing:
1. Create the infra stack ( GCP runner, cert-manager, rancher )
Expand Down
8 changes: 4 additions & 4 deletions tests/cypress/latest/e2e/unit_tests/capa_eks_cluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ describe('Import CAPA EKS', { tags: '@full' }, () => {

// Go to Cluster Management > CAPI > Clusters and check if the cluster has started provisioning
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: timeout });
})
);

it('Auto import child CAPA cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName);
cy.contains(new RegExp('Pending.*' + clusterName));

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: 300000 });
cy.searchCluster(clusterName);
cy.contains(new RegExp('Active.*' + clusterName), { timeout: 300000 });
})

qase(32,
Expand Down
8 changes: 4 additions & 4 deletions tests/cypress/latest/e2e/unit_tests/capa_rke2_cluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ describe('Import CAPA RKE2', { tags: '@full' }, () => {

// Go to Cluster Management > CAPI > Clusters and check if the cluster has started provisioning
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: timeout });
})
);

it('Auto import child CAPA cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName) || cy.contains('Active ' + clusterName);
cy.contains(new RegExp('Pending.*' + clusterName)) || cy.contains(new RegExp('Active.*' + clusterName));
// cy.getBySel('sortable-table-list-container')

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: 300000 });
cy.searchCluster(clusterName);
cy.contains(new RegExp('Active.*' + clusterName), { timeout: 300000 });
})

qase(32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ describe('Import CAPD Kubeadm', { tags: '@short' }, () => {
it('Auto import child CAPD cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Pending.*' + clusterName), { timeout: timeout });

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: timeout });
cy.searchCluster(clusterName);
cy.contains(new RegExp('Active.*' + clusterName), { timeout: timeout });
// TODO: Check MachineSet unavailable status and use checkCAPIClusterActive
cy.checkCAPIClusterProvisioned(clusterName);
})
Expand Down
6 changes: 3 additions & 3 deletions tests/cypress/latest/e2e/unit_tests/capd_rke2_cluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ describe('Import CAPD RKE2', { tags: '@short' }, () => {
it('Auto import child CAPD cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Pending.*' + clusterName), { timeout: timeout });

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: timeout });
cy.searchCluster(clusterName);
cy.contains(new RegExp('Active.*' + clusterName), { timeout: timeout });
// TODO: Check MachineSet unavailable status and use checkCAPIClusterActive
cy.checkCAPIClusterProvisioned(clusterName);
})
Expand Down
8 changes: 4 additions & 4 deletions tests/cypress/latest/e2e/unit_tests/capz_cluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@ describe('Import CAPZ', { tags: '@full' }, () => {
// Go to Cluster Management > CAPI > Clusters and check if the cluster has started provisioning
cypressLib.burgerMenuToggle();
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: timeout });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: timeout });
})
);

qase(22, it('Auto import child CAPZ cluster', () => {
// Check child cluster is created and auto-imported
cy.goToHome();
cy.contains('Pending ' + clusterName);
cy.contains(new RegExp('Pending.*' + clusterName));

// Check cluster is Active
cy.clickButton('Manage');
cy.contains('Active ' + clusterName, { timeout: 300000 });
cy.searchCluster(clusterName);
cy.contains(new RegExp('Active.*' + clusterName), { timeout: 300000 });
})
);
qase(23, it('Install App on imported cluster', { retries: 1 }, () => {
Expand Down
10 changes: 5 additions & 5 deletions tests/cypress/latest/e2e/unit_tests/providers_setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Enable CAPI Providers', () => {
// Create Docker Infrastructure provider
cy.addInfraProvider('Docker', dockerProvider, 'capd-system');
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', dockerProvider, ' infrastructure ', dockerProvider, ' ', kubeadmProviderVersion)
statusReady = statusReady.concat(dockerProvider, 'infrastructure', dockerProvider, kubeadmProviderVersion)
cy.contains(statusReady);
})
);
Expand All @@ -89,7 +89,7 @@ describe('Enable CAPI Providers', () => {
cy.checkCAPIMenu();
cy.contains('Providers').click();
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', fleetProvider, ' addon ', fleetProvider, ' ', 'v0.4.0')
statusReady = statusReady.concat(fleetProvider, 'addon', fleetProvider, 'v0.4.0')
cy.contains(statusReady).scrollIntoView();
});
});
Expand All @@ -102,7 +102,7 @@ describe('Enable CAPI Providers', () => {
cypressLib.burgerMenuToggle();
cy.addInfraProvider('Amazon', amazonProvider, 'capa-system', amazonProvider);
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', amazonProvider, ' infrastructure ', amazonProvider, ' ', 'v2.6.1')
statusReady = statusReady.concat(amazonProvider, 'infrastructure', amazonProvider, 'v2.6.1')
cy.contains(statusReady);
})
);
Expand All @@ -114,7 +114,7 @@ describe('Enable CAPI Providers', () => {
cypressLib.burgerMenuToggle();
cy.addInfraProvider('Google', googleProvider, 'capg-system', googleProvider);
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', googleProvider, ' infrastructure ', googleProvider, ' ', 'v1.8.0')
statusReady = statusReady.concat(googleProvider, 'infrastructure', googleProvider, 'v1.8.0')
cy.contains(statusReady, { timeout: 120000 });
})
);
Expand All @@ -125,7 +125,7 @@ describe('Enable CAPI Providers', () => {
cypressLib.burgerMenuToggle();
cy.addInfraProvider('Azure', azureProvider, 'capz-system', azureProvider);
var statusReady = 'Ready'
statusReady = statusReady.concat(' ', azureProvider, ' infrastructure ', azureProvider)
statusReady = statusReady.concat(azureProvider, 'infrastructure', azureProvider)
cy.contains(statusReady, { timeout: 180000 });
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Install Turtles Operator', { tags: '@install' }, () => {
cy.byLabel('Arguments').as('label')
cy.get('@label').type(' --insecure-skip-verify=true')
cy.clickButton('Save');
cy.contains('Active' + ' ' + deployment);
cy.contains(new RegExp('Active.*' + deployment));
cy.namespaceReset();
})

Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/latest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"homepage": "https://github.com/rancher/rancher-turtles-e2e",
"dependencies": {
"@cypress/grep": "^4.1.0",
"@rancher-ecp-qa/cypress-library": "1.1.0",
"@rancher-ecp-qa/cypress-library": "1.2.2",
"cy-verify-downloads": "^0.1.8",
"cypress": "^13.6.4",
"cypress-dark": "^1.8.3",
Expand Down
23 changes: 13 additions & 10 deletions tests/cypress/latest/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Cypress.Commands.add('createNamespace', (namespace) => {
cy.contains('Create Namespace').click();
cy.typeValue('Name', namespace);
cy.clickButton('Create');
cy.contains('Active' + ' ' + namespace);
cy.contains(new RegExp('Active.*' + namespace));
cy.namespaceReset();
});

Expand All @@ -81,17 +81,17 @@ Cypress.Commands.add('namespaceReset', () => {
// Command to check CAPI cluster Active status
Cypress.Commands.add('checkCAPIClusterActive', (clusterName) => {
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: 90000 });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: 90000 });
cy.contains('Machine Deployments').click();
cy.contains('Running ' + clusterName, { timeout: 90000 });
cy.contains(new RegExp('Running.*' + clusterName), { timeout: 90000 });
cy.contains('Machine Sets').click();
cy.contains('Active ' + clusterName, { timeout: 90000 });
cy.contains(new RegExp('Active.*' + clusterName), { timeout: 90000 });
});

// Command to check CAPI cluster Provisioned status
Cypress.Commands.add('checkCAPIClusterProvisioned', (clusterName) => {
cy.checkCAPIMenu();
cy.contains('Provisioned ' + clusterName, { timeout: 90000 });
cy.contains(new RegExp('Provisioned.*' + clusterName), { timeout: 90000 });
});

// Command to check CAPI cluster deletion status
Expand Down Expand Up @@ -321,15 +321,18 @@ Cypress.Commands.add('patchYamlResource', (clusterName, namespace, resourceKind,
cy.namespaceReset();
});

// Command to remove cluster from Rancher
Cypress.Commands.add('deleteCluster', (clusterName) => {
// Command to search cluster in cluster-list
Cypress.Commands.add('searchCluster', (clusterName) => {
cy.goToHome();
cy.clickButton('Manage');
cy.getBySel('cluster-list').should('be.visible');
cy.contains(clusterName);
cy.typeInFilter(clusterName);
});

// Command to remove cluster from Rancher
Cypress.Commands.add('deleteCluster', (clusterName) => {
cy.searchCluster(clusterName);
cy.viewport(1920, 1080);
cy.typeInFilter(clusterName);
cy.getBySel('sortable-table_check_select_all').click();
cy.clickButton('Delete');
cy.getBySel('prompt-remove-input')
Expand Down Expand Up @@ -411,7 +414,7 @@ Cypress.Commands.add('checkFleetGitRepo', (repoName, workspace) => {
if (!workspace) {
workspace = 'fleet-local';
}
cy.contains(workspace).should('be.visible').click();
cy.contains(workspace).click();
// Click the repo link
cy.contains(repoName).click();
cy.url().should("include", "fleet/fleet.cattle.io.gitrepo/" + workspace + "/" + repoName)
Expand Down
1 change: 1 addition & 0 deletions tests/cypress/latest/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ declare global {
accesMenuSelection(firstAccessMenu: string, secondAccessMenu?: string): Chainable<Element>;
installApp(appName: string, namespace: string, questions?: any): Chainable<Element>;
deleteCluster(clusterName: string): Chainable<Element>;
searchCluster(clusterName: string): Chainable<Element>;
createNamespace(namespace: string): Chainable<Element>;
setNamespace(namespace: string): Chainable<Element>;
checkCAPIClusterActive(clustername: string): Chainable<Element>;
Expand Down
32 changes: 16 additions & 16 deletions tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
module github.com/rancher/rancher-turtles-e2e/tests

go 1.20
go 1.22.0

toolchain go1.23.3

require (
github.com/onsi/ginkgo/v2 v2.12.1
github.com/onsi/gomega v1.28.0
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20241105101633-1357dc536a2e
github.com/onsi/ginkgo/v2 v2.22.0
github.com/onsi/gomega v1.34.2
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20241114104736-0d5b41ca9158
github.com/rancher-sandbox/qase-ginkgo v1.0.1
github.com/sirupsen/logrus v1.9.3
)

require (
github.com/antihax/optional v1.0.0 // indirect
github.com/bramvdbogaerde/go-scp v1.2.1 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 // indirect
github.com/google/pprof v0.0.0-20241203143554-1e3fdc7de467 // indirect
github.com/pkg/errors v0.9.1 // indirect
go.qase.io/client v0.0.0-20231114201952-65195ec001fa // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.28.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/tools v0.27.0 // indirect
google.golang.org/protobuf v1.35.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
libvirt.org/libvirt-go-xml v7.4.0+incompatible // indirect
Expand Down
Loading
Loading