-
Notifications
You must be signed in to change notification settings - Fork 593
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 CDI Upload integration test #6338
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: glekner The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
ff59354
to
e7224ab
Compare
/retest |
e7224ab
to
63ba174
Compare
} from '@console/ceph-storage-plugin/integration-tests/views/pvc.view'; | ||
|
||
describe('KubeVirt CDI Upload', () => { | ||
const pvc = { name: 'upload-pvc', size: 1, unit: 'Gi', storageClassName: 'rook-ceph' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rook-ceph
is not on 4.5/4.6, we can use 'standard' for safety.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use the STORAGE_CLASS env variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STORAGE_CLASS is defined in utils/constants/common.ts
, can just use it.
await click(saveChangesBtn); | ||
await browser.wait(until.textToBePresentInElement(cdiUploadView.uploadProgress, '100%')); | ||
}, | ||
VM_CREATE_AND_EDIT_TIMEOUT_SECS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should use a more proper timeout constants here, maybe CDI_UPLOAD_TIMEOUT_SECS
.
it( | ||
'ID() Upload data to CDI', | ||
async () => { | ||
const fileToUpload = '../views/cdiUploadView.ts'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have a dedicated file for the upload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm against making the console repo larger in size, if we're talking about creating a new txt file its fine by me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a simple text file is fine. We just don't want to depend on a random source file, which could change a location for example due to refactoring.
}); | ||
await cdiUploadView.uploadInput.sendKeys(absolutePath); | ||
await click(saveChangesBtn); | ||
await browser.wait(until.textToBePresentInElement(cdiUploadView.uploadProgress, '100%')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we start a VM/container and check the file/content is there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is outside our scope, the responsibility of this UI section is to upload a file, what you're talking about is the CDI responsibility.
We can however go to the PVCs page and check that the pvc is there and bounded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start a VM needs the upload file is a truly vm image, we can do it in tier2 test for this card: https://issues.redhat.com/browse/CNV-6020.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not out of the scope, because we are doing final integration tests here. And we can't just depend on a simple status to check that everything went well.
ok we can move it to tier2 tests then @gouyang can you create a description for this test please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment to https://issues.redhat.com/browse/CNV-6020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added comment @gouyang
} from '@console/ceph-storage-plugin/integration-tests/views/pvc.view'; | ||
|
||
describe('KubeVirt CDI Upload', () => { | ||
const pvc = { name: 'upload-pvc', size: 1, unit: 'Gi', storageClassName: 'rook-ceph' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the unit is not used. Anyway we could be using a smaller size, since 1Gi is a bit of overkill for a small text file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need at least 100MB for the dv to initiate succesfully
await selectItemFromDropdown(pvc.storageClassName, storageclassDropdown); | ||
|
||
// firefox needs the input to be shown | ||
await browser.executeAsyncScript(function(callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have some more info on this? The input is visible by default, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our tests is running against chrome only, it's can be removed if it's firefox specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but developers can run this test locally with firefox?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it has no side affect to run it with chrome, I'm okay with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
63ba174
to
995c56c
Compare
995c56c
to
023217f
Compare
|
||
await inputPVCName.sendKeys(pvc.name); | ||
await inputPVCSize.sendKeys(pvc.size); | ||
await click(cdiUploadView.unitDropdown); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use selectDropdownOption here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectDropdownOption
needs a specific option.
since the classes are dynamic, its safer to just pick the first option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the same function is used by selectNetworkTypeByID which is testing the same underlying component Dropdown.
Is there some issue with using the same approach here?
023217f
to
ad36937
Compare
|
ad36937
to
70eefc5
Compare
@glekner highlighting #6338 (comment) |
@glekner: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
I passed the test locally with a few changes.
|
And it would be better to clean the created dv/pvc after the test. |
I created a follow-up PR #6735 for this. |
No description provided.