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 1872981: Add basic functionality tests for selecting multiple storage classes #6394

Merged
merged 1 commit into from Sep 8, 2020

Conversation

afreen23
Copy link
Contributor

Screenshot from 2020-08-20 16-53-47

@openshift-ci-robot openshift-ci-robot added component/ceph Related to ceph-storage-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 21, 2020
@bipuladh
Copy link
Contributor

/retest
/approve

@openshift-ci-robot openshift-ci-robot added the component/lso Related to local-storage-operator-plugin label Aug 21, 2020
portability: null,
devicesCount: null,
};
beforeAll(init);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please create a anon code block and put the code inside beforeAll it makes things easier for people to understand,.

devicesCount: null,
};
beforeAll(init);
afterAll(teardown);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

import { NS } from '../../utils/consts';
import { appHost } from '@console/internal-integration-tests/protractor.conf';

const fetchStorageClusterYAML = () => {
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 fetchStorageClusterYAML = () => {
const fetchStorageClusterJSON: K8sResourceKind = () => {

It's not fetching YAML.

let index: number;
let deviceSets: DeviceSet[];
beforeAll(async () => {
const yaml: K8sResourceKind = fetchStorageClusterYAML();
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 yaml: K8sResourceKind = fetchStorageClusterYAML();
const yaml: K8sResourceKind = fetchStorageClusterJSON();

const yaml: K8sResourceKind = fetchStorageClusterYAML();
beforeCapacityAddition.deviceSets = yaml.spec.storageDeviceSets.length;
await addCapacity(yaml.metadata.uid, scName);
const latestYaml: K8sResourceKind = fetchStorageClusterYAML();
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 latestYaml: K8sResourceKind = fetchStorageClusterYAML();
const latestYaml: K8sResourceKind = fetchStorageClusterJSON();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

let latestDeviceSets: DeviceSet[];
let latestIndex: number;
beforeAll(async () => {
const yaml: K8sResourceKind = fetchStorageClusterYAML();
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 yaml: K8sResourceKind = fetchStorageClusterYAML();
const json: K8sResourceKind = fetchStorageClusterJSON();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack

@@ -1,10 +1,16 @@
export const storageClass = {
export const mockNoProvisionerSC = {
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
export const mockNoProvisionerSC = {
export const NoProvisionerSC = {

No need to add mock in front as it's all inside the mock folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I see mockNoProvisionerSC somewhere I can make out that it is a mock storage class.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's follow the pattern that we already have set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed the test classes to be prefixed with "test" .

provisioner: 'kubernetes.io/no-provisioner',
reclaimPolicy: 'Delete',
};

export const mockSC = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

clickKebabAction,
} from '../../views/add-capacity.view';
import { NS } from '../../utils/consts';
import { appHost } from '@console/internal-integration-tests/protractor.conf';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: move it above relative imports.

Comment on lines +18 to +20
const options: ExecFileOptionsWithStringEncoding = {
encoding: 'utf8',
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Not required default is utf8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack

@afreen23 afreen23 changed the title Add tests for multiple storage class selection to improve the stability of add capacity feature Bug 1872981: Add scenarios for multiple storage class selection during add capacity Aug 27, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Aug 27, 2020
@openshift-ci-robot
Copy link
Contributor

@afreen23: This pull request references Bugzilla bug 1872981, 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.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1872981: Add scenarios for multiple storage class selection during add capacity

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 openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 27, 2020
Copy link
Contributor

@bipuladh bipuladh left a comment

Choose a reason for hiding this comment

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

Please rename the title. Scenarios is not clear.

name: 'test-sc',
namespace: 'openshift-storage',
},
metadata: { name: 'mock-no-prov-sc' },
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
metadata: { name: 'mock-no-prov-sc' },
metadata: { name: 'no-prov-sc' },

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lets have test-no-prov-sc

export const mockSC = {
apiVersion: 'storage.k8s.io/v1',
kind: 'StorageClass',
metadata: { name: 'mock-ebs-sc' },
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
metadata: { name: 'mock-ebs-sc' },
metadata: { name: 'ebs-sc' },

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lets have test-ebs-sc to differentiate it as a mock stoarge class for testing pupose

@afreen23
Copy link
Contributor Author

afreen23 commented Sep 8, 2020

/hold
looking into failing tests

@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 Sep 8, 2020
@afreen23
Copy link
Contributor Author

afreen23 commented Sep 8, 2020

/hold cancel

@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 Sep 8, 2020
…asses

Signed-off-by: Afreen Rahman <afrahman@redhat.com>
@afreen23 afreen23 changed the title Bug 1872981: Add scenarios for multiple storage class selection during add capacity Bug 1872981: Add basic functionality tests for selecting multiple storage classes Sep 8, 2020
@bipuladh
Copy link
Contributor

bipuladh commented Sep 8, 2020

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afreen23, bipuladh

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

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 34f5a8b into openshift:master Sep 8, 2020
@openshift-ci-robot
Copy link
Contributor

@afreen23: All pull requests linked via external trackers have merged:

Bugzilla bug 1872981 has been moved to the MODIFIED state.

In response to this:

Bug 1872981: Add basic functionality tests for selecting multiple storage classes

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.6 milestone Sep 11, 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-medium Referenced Bugzilla bug's severity is medium 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 component/lso Related to local-storage-operator-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

6 participants