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
Bug 1872981: Add basic functionality tests for selecting multiple storage classes #6394
Conversation
afreen23
commented
Aug 21, 2020

|
/retest |
dd65e48
to
7962c04
Compare
7962c04
to
a087540
Compare
| portability: null, | ||
| devicesCount: null, | ||
| }; | ||
| beforeAll(init); |
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.
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); |
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.
Same as above
| import { NS } from '../../utils/consts'; | ||
| import { appHost } from '@console/internal-integration-tests/protractor.conf'; | ||
|
|
||
| const fetchStorageClusterYAML = () => { |
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.
| const fetchStorageClusterYAML = () => { | |
| const fetchStorageClusterJSON: K8sResourceKind = () => { |
It's not fetching YAML.
| let index: number; | ||
| let deviceSets: DeviceSet[]; | ||
| beforeAll(async () => { | ||
| const yaml: K8sResourceKind = fetchStorageClusterYAML(); |
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.
| 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(); |
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.
| const latestYaml: K8sResourceKind = fetchStorageClusterYAML(); | |
| const latestYaml: K8sResourceKind = fetchStorageClusterJSON(); |
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.
ack
| let latestDeviceSets: DeviceSet[]; | ||
| let latestIndex: number; | ||
| beforeAll(async () => { | ||
| const yaml: K8sResourceKind = fetchStorageClusterYAML(); |
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.
| const yaml: K8sResourceKind = fetchStorageClusterYAML(); | |
| const json: K8sResourceKind = fetchStorageClusterJSON(); |
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.
ack
| @@ -1,10 +1,16 @@ | |||
| export const storageClass = { | |||
| export const mockNoProvisionerSC = { | |||
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.
| export const mockNoProvisionerSC = { | |
| export const NoProvisionerSC = { |
No need to add mock in front as it's all inside the mock folder.
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.
When I see mockNoProvisionerSC somewhere I can make out that it is a mock storage class.
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.
Let's follow the pattern that we already have set.
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.
Renamed the test classes to be prefixed with "test" .
| provisioner: 'kubernetes.io/no-provisioner', | ||
| reclaimPolicy: 'Delete', | ||
| }; | ||
|
|
||
| export const mockSC = { |
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.
Same as above.
| clickKebabAction, | ||
| } from '../../views/add-capacity.view'; | ||
| import { NS } from '../../utils/consts'; | ||
| import { appHost } from '@console/internal-integration-tests/protractor.conf'; |
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.
Nit: move it above relative imports.
| const options: ExecFileOptionsWithStringEncoding = { | ||
| encoding: 'utf8', | ||
| }; |
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.
Not required default is utf8
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.
Ack
|
@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
In response to this:
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. |
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.
Please rename the title. Scenarios is not clear.
| name: 'test-sc', | ||
| namespace: 'openshift-storage', | ||
| }, | ||
| metadata: { name: 'mock-no-prov-sc' }, |
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.
| metadata: { name: 'mock-no-prov-sc' }, | |
| metadata: { name: 'no-prov-sc' }, |
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.
Lets have test-no-prov-sc
| export const mockSC = { | ||
| apiVersion: 'storage.k8s.io/v1', | ||
| kind: 'StorageClass', | ||
| metadata: { name: 'mock-ebs-sc' }, |
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.
| metadata: { name: 'mock-ebs-sc' }, | |
| metadata: { name: 'ebs-sc' }, |
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.
Lets have test-ebs-sc to differentiate it as a mock stoarge class for testing pupose
a087540
to
e19a3f2
Compare
|
/hold |
e19a3f2
to
2ec8c61
Compare
|
/hold cancel |
…asses Signed-off-by: Afreen Rahman <afrahman@redhat.com>
2ec8c61
to
5ad3d67
Compare
|
/lgtm |
|
[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 |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@afreen23: All pull requests linked via external trackers have merged: Bugzilla bug 1872981 has been moved to the MODIFIED state. In response to this:
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. |