forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubevirt: add mac spoof check for nad
- Loading branch information
Showing
3 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 31 additions & 2 deletions
33
frontend/packages/kubevirt-plugin/integration-tests-cypress/tests/tier1-a/nad.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,48 @@ | ||
import { K8S_KIND } from '../../utils/const/index'; | ||
import { createNAD, deleteNAD } from '../../views/nad'; | ||
|
||
const name = 'test-nad'; | ||
const name1 = 'nad-uncheck-macspoof'; | ||
const bridge = 'br0'; | ||
// TODO: Don't use default project after bz2023560 is fixed. | ||
const testName = 'default'; | ||
|
||
describe('Test network attachment definition', () => { | ||
before(() => { | ||
cy.Login(); | ||
cy.visit('/'); | ||
}); | ||
|
||
it('ID(CNV-3256) Create NAD', () => { | ||
beforeEach(() => { | ||
cy.visitNADPage(); | ||
}); | ||
|
||
after(() => { | ||
cy.deleteResource(K8S_KIND.NAD, name, testName); | ||
cy.deleteResource(K8S_KIND.NAD, name1, testName); | ||
}); | ||
|
||
it('ID(CNV-3256) Create NAD with MAC Spoof checked', () => { | ||
createNAD(name, bridge); | ||
cy.exec(`oc get net-attach-def ${name} -n ${testName} -o jsonpath={.spec.config}`).then( | ||
(output) => { | ||
const res = JSON.parse(output.stdout); | ||
expect(res.macspoofchk).toEqual(true); | ||
}, | ||
); | ||
}); | ||
|
||
it('ID(CNV-7522) Create NAD with MAC Spoof unchecked', () => { | ||
createNAD(name1, bridge, true); | ||
cy.exec(`oc get net-attach-def ${name1} -n ${testName} -o jsonpath={.spec.config}`).then( | ||
(output) => { | ||
const res = JSON.parse(output.stdout); | ||
expect(res.macspoofchk).toEqual(false); | ||
}, | ||
); | ||
}); | ||
|
||
it('ID(CNV-4288) Delete NAD', () => { | ||
deleteNAD(name); | ||
deleteNAD(name1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters