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

Automated testcase for creating a bucket with cache and multids #70

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

HaruChebrolu
Copy link

@HaruChebrolu HaruChebrolu commented Aug 3, 2022

Added test cases for following scenarios:

  1. Add a bucket with cache enabled and type "single".
  2. Add multids bucket.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 3, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: HaruChebrolu
Once this PR has been reviewed and has the lgtm label, please assign cloudbehl for approval by writing /assign @cloudbehl in a comment. For more information see:The Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -91,4 +92,50 @@ describe('Bucket policy page', () => {
cy.byTestID('delete-action').click();
cy.byTestID(SINGLE_BUCKET_POLICY).should('not.exist');
});

// This creates bucket policy from data sources dropdown with cache
it('creates Bucket policy with single data source and enabled cache', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please have a look into this PR Idea is to bring out common stuff into a separate file as we have to the data source.

@alfonsomthd what is your opinion regarding this, should we have a common separate file?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree on code reuse: let's move the common logic to a helper method on the appropriate helper file.

import { Providers, TEST_DATA_SOURCE } from '../constants/tests';
import { createDataSource } from './data-resource';

export const createBucket = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make this as a keep value pair as we have for:
export const MCGMSCommon = { visitMcgMsDashboard: () => { .... }, visitBucketPolicyList: () => { ..... }, visitDataSourceListPage: () => { .... }, };

Copy link
Contributor

Choose a reason for hiding this comment

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

can be named as BPCommons

import { Providers, TEST_DATA_SOURCE } from '../constants/tests';
import { createDataSource } from './data-resource';

export const createBucket = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Since it will be part of BPCommon, we can name the function createUsingSingleDS so that in future we can add methods for creating BP using multi DS

}
};

export const ConfirmCreateBucket = () => {
Copy link
Contributor

@debjyoti-pandit debjyoti-pandit Aug 4, 2022

Choose a reason for hiding this comment

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

I think this should be part of creating only as no one will call only to select the ns dropdown and click ok

cy.byTestID('confirm-action-bucket').click();
};

export const checkBucketCreation = (
Copy link
Contributor

Choose a reason for hiding this comment

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

confirmCreation

.should('contain', '1 ObjectBucketClaim');
};

export const deleteBucket = (bucketName: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

we are deleting from where details page or list page, better to mention it in name deleteFromDetailsPage or deleteFromListPage.

And also keep the navigating to the particular page out as this method should only delete the item.

@HaruChebrolu HaruChebrolu changed the title Automated testcase for creating a bucket with cache Automated testcase for creating a bucket with cache and multids Aug 4, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 4, 2022

@HaruChebrolu: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/mcg-ms-console-e2e-aws 49711d1 link true /test mcg-ms-console-e2e-aws

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.

@openshift-merge-robot
Copy link
Collaborator

@HaruChebrolu: PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants