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

Bug 1835597: Add easier way to support selectors for multiple versions in OCS Tests #5137

Merged
merged 1 commit into from May 14, 2020

Conversation

bipuladh
Copy link
Contributor

  • Add a way to write tests with support for multiple versions of selectors.
    cc @ebondare @shyRozen

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. component/ceph Related to ceph-storage-plugin labels Apr 21, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2020
@bipuladh
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 21, 2020
@bipuladh
Copy link
Contributor Author

/hold

@bipuladh
Copy link
Contributor Author

/unhold

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 28, 2020
@bipuladh
Copy link
Contributor Author

/hold cancel

@bipuladh bipuladh changed the title [WIP]: Add easier way to support selectors for multiple versions in OCS Tests Add easier way to support selectors for multiple versions in OCS Tests Apr 28, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 28, 2020
@bipuladh
Copy link
Contributor Author

bipuladh commented May 5, 2020

The motive behind this PR:

  • Declare selectors as objects for different versions.
  • Use environment variables to detect the OCP Version.
  • Based on the OCP version return the appropriate object that has the required selectors.


export const currentSelectors = (() => {
switch (VERSION) {
case 'OCP_44':
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, can you please rename the version's name to OCP_4.4.


getStorageClusterLink: async () => {
const index = await getOperatorHubCardIndex('Storage Cluster');
const link = $(`article:nth-child(${index + 1}) a`);
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
const link = $(`article:nth-child(${index + 1}) a`);
return $(`article:nth-child(${index + 1}) a`);

.getText();
await click(checkBox);
await browser.wait(until.elementToBeSelected(checkBox));
selectedNodes.push(nodeName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain what are you checking here? Are you individually selecting nodes and not by select all nodes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On second though selecting all at once would be much easier. Thanks will look into it.

@@ -130,78 +157,39 @@ export class InstallCluster {
this.namespace = namespace;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where have you used this property?

@gnehapk
Copy link
Contributor

gnehapk commented May 8, 2020

@bipuladh Since you have removed the ocp-tests folder, the package.json also needs to be modified.

await sendKeys(filterInput, STORAGE_CLASS_PATTERNS.NOOBAA);
const noobaaClass = await getDataFromRowAndCol(0, 1, podNameFilter);
expect(noobaaClass.includes(STORAGE_CLASS_PATTERNS.NOOBAA)).toBe(true);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also add check for osd pods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

osd pods cause flakiness.

@gnehapk
Copy link
Contributor

gnehapk commented May 13, 2020

/test e2e-gcp-console

await sendKeys(filterInput, STORAGE_CLASS_PATTERNS.NOOBAA);
const noobaaClass = await getDataFromRowAndCol(0, 1, podNameFilter);
expect(noobaaClass.includes(STORAGE_CLASS_PATTERNS.NOOBAA)).toBe(true);
it('tests if 3 rook-ceph-osd-prepare-ocs-deviceset are running', () => {
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
it('tests if 3 rook-ceph-osd-prepare-ocs-deviceset are running', () => {
it('tests if 3 rook-ceph-osd-prepare-ocs-deviceset are completed', () => {

@gnehapk
Copy link
Contributor

gnehapk commented May 14, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 14, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bipuladh, ebondare, gnehapk, shyRozen

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

The pull request process is described here

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

@bipuladh bipuladh changed the title Add easier way to support selectors for multiple versions in OCS Tests Bug 1835597: Add easier way to support selectors for multiple versions in OCS Tests May 14, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels May 14, 2020
@openshift-ci-robot
Copy link
Contributor

@bipuladh: This pull request references Bugzilla bug 1835597, which is invalid:

  • expected the bug to target the "4.5.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1835597: Add easier way to support selectors for multiple versions in OCS Tests

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.

@openshift-ci-robot
Copy link
Contributor

@bipuladh: This pull request references Bugzilla bug 1835597, which is invalid:

  • expected the bug to target the "4.5.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/bugzilla refresh

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.

@bipuladh
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels May 14, 2020
@openshift-ci-robot
Copy link
Contributor

@bipuladh: This pull request references Bugzilla bug 1835597, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot
Copy link
Contributor

@bipuladh: This pull request references Bugzilla bug 1835597, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@bipuladh
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. and removed bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. labels May 14, 2020
@openshift-ci-robot
Copy link
Contributor

@bipuladh: This pull request references Bugzilla bug 1835597, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@openshift-merge-robot openshift-merge-robot merged commit 52d2728 into openshift:master May 14, 2020
@openshift-ci-robot
Copy link
Contributor

@bipuladh: All pull requests linked via external trackers have merged: openshift/console#5137. Bugzilla bug 1835597 has been moved to the MODIFIED state.

In response to this:

Bug 1835597: Add easier way to support selectors for multiple versions in OCS Tests

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.

@spadgett spadgett added this to the v4.5 milestone May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/ceph Related to ceph-storage-plugin lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants