Skip to content

Commit

Permalink
[Cy] Support vlan Id
Browse files Browse the repository at this point in the history
  • Loading branch information
n313893254 committed Aug 17, 2023
1 parent 3ea3163 commit 6fcbb42
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
11 changes: 10 additions & 1 deletion cypress/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ export default defineConfig({
url: 'https://download.opensuse.org/pub/opensuse/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-15.3-OpenStack-Cloud-Current.qcow2',
},
nfsEndPoint: 'nfs://ip',
vlanIDs: [1, 2],
vlans: [
{
nic: 'ens7',
vlan: 100,
},
{
nic: 'ens8',
vlan: 104
}
],
sshKey: 'Your ssh public key, use for validate connect VM. e.g. ssh-rsa xxx',
privateKeyPath: 'Your ssh private Key Path'
},
Expand Down
10 changes: 10 additions & 0 deletions cypress/cypress.env.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
"name": "cirros-0.5.2-aarch64-disk.img",
"url": "https://github.com/cirros-dev/cirros/releases/download/0.5.2/cirros-0.5.2-aarch64-disk.img"
},
"vlans": [
{
"nic": "ens7",
"vlan": 100
},
{
"nic": "ens8",
"vlan": 104
},
],
"sshKey": "ssh-rsa GgVY6KnKpJqrBd/BGuUoHhh/C3CXhDojb1G1Td6hktaUwH+Q== [email protected]",
"privateKeyPath": "/Users/username/.ssh/id_rsa"
}
13 changes: 6 additions & 7 deletions cypress/testcases/networks/network.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ describe('Check network with Manual Mode', () => {


export function CreateVlan1() {}
// TODO: Require two vlan IDs
describe.skip('Preset Vlans', () => {
describe('Preset Vlans', () => {
function createVlan(vlan: Vlan) {
cy.intercept('POST', `/v1/harvester/k8s.cni.cncf.io.network-attachment-definitions`).as('create');

Expand All @@ -154,8 +153,8 @@ describe.skip('Preset Vlans', () => {
}

it('Create Vlan1', () => {
const vlanIDs = Cypress.env('vlanIDs') || [];
const vlan = vlanIDs[0]
const vlans = Cypress.env('vlans') || [];
const vlan = vlans[0].vlan

cy.login();

Expand All @@ -167,9 +166,9 @@ describe.skip('Preset Vlans', () => {
})
});

it.skip('Create Vlan2', () => {
const vlanIDs = Cypress.env('vlanIDs') || [];
const vlan = vlanIDs[1]
it('Create Vlan2', () => {
const vlans = Cypress.env('vlans') || [];
const vlan = vlans[1].vlan

cy.login();

Expand Down

0 comments on commit 6fcbb42

Please sign in to comment.