Skip to content

Conversation

@gouyang
Copy link
Contributor

@gouyang gouyang commented Aug 5, 2019

Signed-off-by: Guohua Ouyang [email protected]

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gouyang
To complete the pull request process, please assign alecmerdler
You can assign the PR to them by writing /assign @alecmerdler in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 5, 2019
@gouyang gouyang changed the title Test non-admin UI behaviour [Kubevirt] Test non-admin UI behaviour Aug 6, 2019
Copy link

@rhrazdil rhrazdil left a comment

Choose a reason for hiding this comment

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

Please note that new place for tests will be in our plugin folder, which is in frontend/packages/kubevirt-plugin/integration-tests/.

Choose a reason for hiding this comment

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

please, avoid changing frontend/integration-tests/*, this would be better to handle in our kubevirt.login.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay.

Copy link
Member

Choose a reason for hiding this comment

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

We should not be creating a separate kubevirt login imo unless it's absolutely necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some of kubevirt tests are invoking execSync to do some operations from cli to save time, to achieve this it need to do oc login within the login scenario.

@rhrazdil I think maybe we should use yaml dialog or VM wizard to create all resources instead of doing it from command line? So we can share one login scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I revert this change anyway.

Choose a reason for hiding this comment

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

Again, since this changes a file outside of our kubevirt-plugin folder, it would be better to add this change in a separate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

Copy link
Member

Choose a reason for hiding this comment

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

Disagree... We should have the change with this PR that uses it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rhrazdil If we put tests in kubevirt-plugin folder, how do we use the openshift views?

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.

Yes, will address this TODO once the new build available with this fix available.

Choose a reason for hiding this comment

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

Maybe we could use more descriptive name of the secret than test ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about test-secret?

Choose a reason for hiding this comment

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

sounds good

Choose a reason for hiding this comment

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

If I understand correctly, specs that test view and noaccess should be skipped by calling xit, since these tests are not completely implemented

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not need to skip it even the tests are not completely implemented, as long as the test can be run and it's PASS.

Copy link
Member

Choose a reason for hiding this comment

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

I'm still unclear on why we need a separate login scenario just for kubevirt. I'd rather not fork the login test code unless there is a very compelling reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It just has one more line about oc login as our current tests requires.

Copy link
Member

Choose a reason for hiding this comment

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

You don’t need to use oc login for that. You just need the KUBECONFIG env var set. Admin console tests also run cli commands

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then we don't need another login. Could you comment on #2016?

Copy link
Member

Choose a reason for hiding this comment

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

This is no longer needed. Please remove.

Copy link
Member

Choose a reason for hiding this comment

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

!= undefined is not a good practice. We should not be disabling this linter rule

Copy link
Member

Choose a reason for hiding this comment

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

This seems really hacky. We should get to the bottom of why this is an issue instead of adding arbitrary retries

Copy link
Member

Choose a reason for hiding this comment

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

We should not be checking columns by index. Please add a data-test-id if needed

Copy link
Member

Choose a reason for hiding this comment

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

Isn't the default timeout used automatically if not specified?

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export function execCommandFromCli(command: string) {
export function execCommandFromCLI(command: string) {

Copy link
Member

Choose a reason for hiding this comment

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

Remove this comment

Copy link
Member

Choose a reason for hiding this comment

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

Why is there a special kubevirt login view? We already have a login view

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's there because of a bug in web-ui, the logout does not return to login page which cause logout in view/login.view.ts does not work, this login view removes the last line.

But it should not a problem once we're using the some console, will remove it once I get a test for it asap.

Copy link
Member

Choose a reason for hiding this comment

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

We should not be creating a separate kubevirt login imo unless it's absolutely necessary.

Copy link
Member

Choose a reason for hiding this comment

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

Disagree... We should have the change with this PR that uses it.

Signed-off-by: Guohua Ouyang <[email protected]>
@rhrazdil
Copy link

@gouyang please, could you base your patch on top of #2053? It adds most of the infra and places our kubevirt integration tests under kubevirt-plugin folder.

@gouyang gouyang closed this Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants