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

Add initial Cypress Rancher Integration test cases #502

Closed
wants to merge 10 commits into from

Conversation

TachunLin
Copy link
Contributor

@TachunLin TachunLin commented Sep 7, 2022

Purpose

Develop Cypress test for Harvester Rancher integration related test cases.
Plan to fulfill the requirement to automated basic regression and KDM release test.

Development Environment

The development based on the following SUT version and UI

  • Rancher version: v2.6.7
  • Harvester version: v1.0.3
  • Cypress version: 10.2

Prepare Test Environment

We can prepare the Rancher integration test environment in the following manner to provision Harvester with Rancher,

  1. Use vagrant ipxe-example pull request 45, set
  • harvester_network_config.offline: false
  • rancher_config.run_single_node_rancher: true
  • rancher_config.run_single_node_air_gapped_rancher: false
  1. Create separate VMs, one for Harvester and another for Rancher, make sure the network connectivity
  2. Install Harvester and Rancher on bare machines and ensure the connectivity

About Rancher First Time Login

Please be noted
In every test, while login Rancher, it will automatically check whether it's the first time login
The test function rancher.rancherLogin() support bootstrap login in the following scenarios.

  1. Use vagrant ipxe-example to prepare Harvester and Rancher and install sshpass on your local test runner environment
  2. You can also use regular VM or bare machine while you already setup the following
  • ssh root permission to Rancher host VM or bare machine
  • Install sshpass on your local test runner environment

If your environment did not fulfill above requirement, we would suggest you finishing the Rancher bootstrap on your own before running the rancher integration test

Cypress setup

  1. Execute npm install
  2. Execute npm ci
  3. Rename cypress.env.json.example to cypress.env.json file, update and add the following content
"username": "admin",
"password": "passwdpasswd",
"baseUrl": "https://192.168.122.149", 
"rancherUrl": "https://192.168.122.224",
"rancher_user": "admin",
"rancher_password": "passwdpasswd",
"rancher_vm_user": "vagrant",  
"rancher_vm_password": "vagrant",   
 "vagrant_pxe_path": "../ipxe-examples/vagrant-pxe-harvester",

Check test data

You can check and modify all related rancher integration test data in ../cypress/fixtures/rancher.json
The test data here is suitable for Rancher v2.6.7 along with the current KDM release version
Please be noted, on new KDM release, you may need to update these value accordingly.

    "rke2_latest": "1.24.4",
    "rke2_stable": "1.23.10",
    "k3s_latest": "1.24.4",
    "k3s_stable": "1.23.10", 
    "rke1_latest": "1.24.4",
    "rke1_stable": "1.23.10",

And also need to check the image and ssh user name to fulfill what you used in the Prepare Harvester Image and Prepare Harvester VLAN network test case, here I use focal-server and default vlan1

    "image": "focal-server",
    "network_name": "default/vlan1",
    "ssh_user": "ubuntu",

I use ubuntu 20.04 cloud focal by settings the image name and url in cypress.env.json

"image":
  {
    "name": "openSUSE-Leap-15.3-3-DVD-x86_64-Build38.1-Media.iso",
    "url": "https://download.opensuse.org/distribution/leap/15.3/iso/openSUSE-Leap-15.3-3-DVD-x86_64-Build38.1-Media.iso"
  }

Execute Test case

Execute npx cypress open or npx cypress run for the test

Test case list

  1. Prepare Harvester Image (On Harvester)
  2. Prepare Harvester VLAN network (On Harvester)
  3. Rancher import Harvester
  4. Harvester import Rancher (On Harvester)
  5. Check Harvester Cluster Status (On Rancher)
  6. Create Cloud Credential
  7. Provisiong RKE2 Cluster
  8. Check RKE2 Cluster Status
  9. Provisiong K3s Cluster
  10. Check K3s Cluster Status
  11. Verify RKE2 CSI driver
  12. Verify RKE2 Cloud Provider
  13. Verify RKE2 DHDP Load Balancer
  14. Create Harvester VIP Pool (On Harvester)
  15. Create RKE2 Pool Load Balancer
  16. Delete Active RKE2 Cluster
  17. Delete Active K3s Cluster
  18. Delete Cloud Credential
  19. Delete imported Harveter cluster

Recommended group of tests

  1. Complete test flow from test 1 to 19, can fulfill from import Harvester, create credential, provisioning RKE2 and K3s cluster, CSI driver, cloud provider and finally cleanup environment to ensure can rerun every time.
  2. Run test 1 to 6 to prepare an imported Harvester ready for more test
  3. Run test 7, 8, 11, 12, 13 ,14, 15, 16, 18, 19, to verify cloud provider and csi driver on RKE2 cluster and cleanup environment
  4. Run cleanup from test 16 to 19 to cleanup the current the environment

Validation before commit

  • Rancher import Harvester

  • Harvester import Rancher (On Harvester)

  • Check Harvester Cluster Status (On Rancher)

  • Create Cloud Credential

    image

  • Provisiong RKE2 Cluster

  • Check RKE2 Cluster Status

  • Verify RKE2 CSI driver

  • Verify RKE2 Cloud Provider

  • Verify RKE2 DHDP Load Balancer

  • Create Harvester VIP Pool

  • Create RKE2 Pool Load Balancer

    image

  • Delete Active RKE2 Cluster

  • Delete Cloud Credential

  • Delete imported Harvester cluster

    image

@noahgildersleeve
Copy link
Contributor

noahgildersleeve commented Sep 13, 2022

@TachunLin I tried to run these tests and after getting the setup running I got this error when trying to run the rancher_integration.spec.ts with npx cypress run -s testcases/rancher/rancher_integration.spec.ts. I also checked and I have sshpass 1.06 installed on this system.

  1) Rancher Integration Test
       Rancher import Harvester:
     CypressError: `cy.exec('sshpass -p $VM_PASSWORD ssh $VM_USER@$VM_IP -t "docker ps --format {{.ID}} | xargs docker logs 2>&1 | grep 'Bootstrap Password:' | sed 's/.*Password: //'"')` failed because the command exited with a non-zero code.

Pass `{failOnNonZeroExit: false}` to ignore exit code failures.

Information about the failure:
Code: 6

Stderr:
Pseudo-terminal will not be allocated because stdin is not a terminal.

https://on.cypress.io/exec
      at https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:154919:85
      at tryCatcher (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:13012:23)
      at Promise._settlePromiseFromHandler (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:10947:31)
      at Promise._settlePromise (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:11004:18)
      at Promise._settlePromise0 (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:11049:10)
      at Promise._settlePromises (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:11129:18)
      at _drainQueueStep (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:7719:12)
      at _drainQueue (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:7712:9)
      at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:7728:5)
      at Async.drainQueues (https://rancher-vagrant-vm.local/__cypress/runner/cypress_runner.js:7598:14)
  From Your Spec Code:
      at rancherPage.firstTimeLogin (https://rancher-vagrant-vm.local/__cypress/tests?p=testcases/rancher/rancher_integration.spec.ts:501:12)
      at Context.eval (https://rancher-vagrant-vm.local/__cypress/tests?p=testcases/rancher/rancher_integration.spec.ts:533:22)

@TachunLin
Copy link
Contributor Author

TachunLin commented Sep 13, 2022

@noahgildersleeve, appreciated for checking and remind me for the rancher bootstrap login.

Currently we can utilize rancher first time login in the following environment

  1. Use ipxe-example vagrant install Rancher and Harvester as stated in [FEAT]: Harvester #2096 Local Test Rancher Infrastructure Enhancement (air-gapped) ipxe-examples#45
  2. Setup Rancher and Harvester on separate VM or bare machines

When using ipxe-example to setup environment, we can simply specify user vagrant with password vagrant in the cypress.env.json

  ...
  "rancher_vm_user": "vagrant",
  "rancher_vm_password": "vagrant",

If the Rancher built on VM or bare machine, we need to enable root ssh login to rancher host environment and set the username password as the following:

  1. Enable ssh service on Rancher VM or host machine
  2. Allow SSH login for root user (Take Ubuntu 20.04 for example) and set root password
davidtclin@ubuntu-clean:~$ sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
davidtclin@ubuntu-clean:~$ sudo systemctl restart ssh
davidtclin@ubuntu-clean:~$ sudo passwd
New password: 
Retype new password: 
passwd: password updated successfully
  1. Check the Rancher VM username and password on rancher_vm_user , rancher_vm_password in cypress.env.json
    It require using root username and password to actually docker exec interact with rancher container
  "baseUrl": "https://192.168.122.149",
  "rancherUrl": "https://192.168.122.230", 
  "rancher_user": "admin",
  "rancher_password": "passwdpasswd",
  "rancher_vm_user": "root",
  "rancher_vm_password": "passwd",

I setup a brand new Ubuntu 20.04 VM with Rancher v2.6.8 to validate the rancher bootstrap login on regular VM
After grant root ssh permission and set the root username, password

Then rerun the single Rancher import Harvester test could get the bootstrap password and login Rancher
image

And check the basic import Rancher import Harvester flow
image

@noahgildersleeve
Copy link
Contributor

I tested this locally. To get it running you needed to change the it.only block on the rancher integration tests. That will cause only the import to run. I tried it running as the vagrant user and got this
Screenshot_20220914_154138
I also tried it as root with the associated changes and got this
Screenshot_20220914_170811

I saw something similar when trying to run it with cypress open The tab ended up crashing.


});

it.only('Rancher import Harvester', { baseUrl: constants.rancherUrl}, () => {
Copy link
Contributor

@noahgildersleeve noahgildersleeve Sep 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This it.only block causes none of the other tests in the spec to run.

@TachunLin
Copy link
Contributor Author

@noahgildersleeve , thanks for checking the updated commit, it remind me to test the whole suite in command run mode

In the beginning, I encounter the same failure as your attempts, cypress runner stop and prompt
Chromium Renderer process just crashed

I tried using --browser chrome but still can't improve.

Then I add the adding --disable-dev-shm-usage for chrome: in cypress/plugins/index.js provided in
https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2168#note_190617588

image

And update Cypress version from 10.3 to 10.8

I found adding these setting make the execution less crash.

And I notice there is an logic error while determine the RKE1 and RKE2/K3s status which cause the provisioning cluster failure if we start it from the scratch.

Also I found we can't use the default openSUSE-Leap-15.3-3-DVD-x86_64-Build38.1-Media.iso in cypress.env.json
Since in Rancher guest cluster creation page, it can't recognize the iso image type.
The original openSUSE DVD will cause too many time downloading image, which increase the resource usage of cypress test
Thus I change it to ubuntu image instead to ensure faster and re-downloadable for repeated trials

But I still encounter error like AssertionError: Timed out retrying after 60000ms: Expected to find element: .title, but never found it.
image

Under further investigation, I found too frequently login could be possible been rejected by Rancher
Thus I add some wait action to prevent unexpected login rejection

  • Then I could use cypress open to complete all tests from scratch (brand new rancher instance)
    image

  • Also using cypress run to complete all tests
    image

And clean up the only tag on each test

@TachunLin
Copy link
Contributor Author

Hi @noahgildersleeve, @WuJun2016
I have checked and updated all rancher integration test suite on Rancher v2.7.0-rc11 with Harvester v1.1.1-rc1

Verified can completely finish all RKE2 related test suite from scratch and also checked the K3s test suits
image

Please help to check when you are available. Thank you.

Copy link
Contributor

@n313893254 n313893254 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified RKE2 test case, mainly failed in the class name selector error.

cy.contains(harvester_cluster_name).click();
})

cy.get(this.cloudCredential_page_confirmCreate).should('contain', 'Create').click();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cy.get(this.cloudCredential_page_confirmCreate).should('contain', 'Create').click();
cy.wait(1000).get(this.cloudCredential_page_confirmCreate).should('contain', 'Create').click();

I failed in this case because the Kubeconfig was not ready, Recommend adding wait(1000)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the recommendation. Add wait(1000) to the line 324 in pageobjects/rancher.po.ts

private rke2Creation_page_k8s_rke2Latest = '#vs1__option-1';
private rke2Creation_page_k8s_rke2Stable = '#vs1__option-2';

private rke2Creation_page_k8s_k3sLatest = '#vs1__option-4';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

vs1__option-4 will change depending on different environments. In my browser is vs11__option-4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the instruction, change the menu drop down list selection using LabeledSelectPo in /utils/components/labeled-select.po

new LabeledSelectPo('.labeled-select', `:contains("Kubernetes Version")`).select({option: rke2_cluster_attributes.rke2_latest, selector: '.vs__dropdown-menu'})

Comment on lines 352 to 353
cy.get(this.rke2Creation_page_networkNameCombo).click().then(($list) => {
cy.get(this.rke2Creation_page_networkNameOption).should('contain', rke2_cluster_attributes.network_name).click();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cy.get(this.rke2Creation_page_networkNameCombo).click().then(($list) => {
cy.get(this.rke2Creation_page_networkNameOption).should('contain', rke2_cluster_attributes.network_name).click();
const networkSelect = new LabeledSelectPo('.labeled-select', `:contains("Network Name")`);
networkSelect.select({option: rke2_cluster_attributes.network_name, selector: '.vs__dropdown-menu'});

Ditto, will be failed when there have other network options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the instruction, change the menu drop down list selection using LabeledSelectPo in /utils/components/labeled-select.po

const networkSelect = new LabeledSelectPo('.labeled-select', `:contains("Network Name")`);
networkSelect.select({option: rke2_cluster_attributes.network_name, selector: '.vs__dropdown-menu'});

And also update the namespace and image drop down selection using the same manner

cypress/package.json Show resolved Hide resolved
Comment on lines 63 to 68
openVlan(value: string) {
const radio = new RadioButtonPo('.radio-group .radio-container', `:contains("Enabled")`);
radio.input('Enabled');
new LabeledSelectPo('section .labeled-select.hoverable', `:contains("Default Network Interface ")`).select({option: value})
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was removed in v1.1.0.

Copy link
Contributor Author

@TachunLin TachunLin Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this function openVlan in settings.po.ts

Comment on lines 81 to 87
enableVLAN(nic: string) {
this.goTo();
this.checkIsCurrentPage();
// this.clickMenu('vlan', 'Edit Setting', 'vlan', HCI.CLUSTER_NETWORK);
// this.openVlan(nic);
// this.update('vlan', HCI.CLUSTER_NETWORK);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can delete this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove function enableVLAN in settings.po.ts

Comment on lines +1 to +25
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this file should not be needed, it already exists here. https://github.com/harvester/tests/blob/main/cypress/support/commands.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebase, the command.js have been updated the latest content

Comment on lines +1 to +20
// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this file should not be needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebase, the e2e.js file have already been removed

Comment on lines +1 to +5
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebase, the example.json remain unchanged.

Comment on lines +1 to +9
const { defineConfig } = require("cypress");

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebase, the cypress.config.js remain unchanged.

Comment on lines 14 to 22
public dashboardUrl = '/c/local/harvester/harvesterhci.io.dashboard';
public settingsUrl = '/c/local/harvester/harvesterhci.io.setting';
public uiSourceUrl = '/c/local/harvester/harvesterhci.io.setting/ui-source?mode=edit';
public hostsPage = '/c/local/harvester/harvesterhci.io.host';
public supportPage = '/c/local/harvester/support';
public vmPage = '/c/local/harvester/kubevirt.io.virtualmachine';
public settingBaseUrl = '/c/local/harvester/harvesterhci.io.setting';
public volumePage = '/c/local/harvester/harvesterhci.io.volume';
public imagePage = '/c/local/harvester/harvesterhci.io.virtualmachineimage';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This address should not be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebase, the constants.ts can align with the harvester/test main

Comment on lines 4 to 7
import LabeledInputPo from '@/utils/components/labeled-input.po';
import LabeledSelectPo from '@/utils/components/labeled-select.po';
import RadioButtonPo from '@/utils/components/radio-button.po'
import { List } from 'cypress/types/lodash';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not used,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the unused import from rancher.po.ts


const constants = new Constants();
const settings = new SettingsPagePo();
var registrationURL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the unused var registrationURL; from rancher.po.ts

Comment on lines 78 to 79
const IMAGE_NAME = 'focal-server-cloudimg-amd64.img';
const IMAGE_URL = 'https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable should be used.
e.g:

   const IMAGE_NAME = imageEnv.name;
   const IMAGE_URL = imageEnv.url;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update using environment variable in rancher_integration.spec.ts

const IMAGE_NAME = imageEnv.name;
const IMAGE_URL = imageEnv.url;

private home_page_mainMenu = '.menu';
private home_page_virtualManagement = ':nth-child(7) > .option > div';

private virtual_page_importButton = '.btn';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

This will find multiple elements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the virtual_page_importButton to specific locator

virtual_page_importButton = '.btn.role-primary';

@TachunLin TachunLin self-assigned this Nov 15, 2022

it('Harvester import Rancher', () => {
cy.login();
rancher.registerRancher();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registerRancher. when saving, needs to check whether the save was successful by returning the page to the list page, or by returning 200 according to the api.

image

It is possible that the page will close immediately after the api is sent, which will cause the api to be canceled。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add checking current url after save the content

cy.url().should('contain', constants.settingsUrl);


rancher.rancherLogin();

rancher.createCloudCredential(rData.cloud_credential, rData.harvester_cluster_name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

When the cluster is selected, the UI sends a request to get kubecfongContent, which is the cause of the failure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error may caused by the previous import Harvester failed or there is a harv-local cloud credential exists

@TachunLin TachunLin force-pushed the rancher-integration-cypress branch 2 times, most recently from ef87c84 to aed24c9 Compare December 6, 2022 06:48
Including the following test cases:

1. Prepare Harvester Image (On Harvester)
2. Prepare Harvester VLAN network (On Harvester)
4. Rancher import Harvester
5. Harvester import Rancher (On Harvester)
6. Check Harvester Cluster Status (On Rancher)
7. Create Cloud Credential
8. Provisiong RKE2 Cluster
9. Check RKE2 Cluster Status
10. Provisiong K3s Cluster
11. Check K3s Cluster Status
12. Verify RKE2 CSI driver
13. Verify RKE2 Cloud Provider
14. Verify RKE2 DHDP Load Balancer
15. Create Harvester VIP Pool
16. Create RKE2 Pool Load Balancer
17. Delete Active RKE2 Cluster
18. Delete Active K3s Cluster
19. Delete Cloud Credential
20. Delete imported Harveter cluster

singed-off by [email protected]
By updating Cypress to 10.3

Signed-off-by: davidtclin <[email protected]>
2. Fix chronium render crash
3. Fix find element error of select guest cluster

Signed-off-by: davidtclin <[email protected]>
Signed-off-by: davidtclin <[email protected]>
Signed-off-by: davidtclin <[email protected]>
1. Rebase and use the new Harvester function for prepare image and create vlan
2. Remove the unused import and function
3. Handle the popup confirm window of cluster registration in Harvester
4. Fix some stability
5. Use  `LabeledSelectPo` to precisely handle dropdown menu selection
@TachunLin
Copy link
Contributor Author

@WuJun2016 , @n313893254
Many thanks for your detailed check and instruction.
I made the following changes for enhancement:

  1. Rebase with v1.1.1 and use the new Harvester function for prepare image and create vlan
  2. Remove the unused import and function
  3. Handle the popup confirm window of cluster registration in Harvester
  4. Fix some stability issue
  5. Use LabeledSelectPo to precisely handle dropdown menu selection

And tested on Rancher v2.7.0 with Harvester v1.1.1-rc2
The entire Rancher integration test suite can correctly and smoothly run to the end
image

Please help to check if I miss any, thank you.

select kubernetes version
2. Update rke2 and k3s version attributes in rancher fixture file
@TachunLin
Copy link
Contributor Author

Also update the provisioning k3s cluster using the same LabeledSelectPo manner
And change the k3s_latest and rke2_latest in cypress/fixtures/rancher.json

Verified can complete all K3s test suite
image

Copy link
Contributor

@WuJun2016 WuJun2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modify the points we just discussed.

@guangbochen
Copy link
Contributor

@khushboo-rancher @TachunLin This PR will be needed for the UI team to continue the cypress multi-tenancy testing development, please help to prioritize it after the v1.2.0 release, thanks. cc @WuJun2016

@TachunLin
Copy link
Contributor Author

Close this PR since some of the test cases already been created in #907
For the rest of the test case, we would reference the content here and create new PR to realize them.

@TachunLin TachunLin closed this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants