Skip to content

Commit

Permalink
Update security and security-dashboards-plugin tests to run with Cypr…
Browse files Browse the repository at this point in the history
…ess12

Signed-off-by: Craig Perkins <cwperx@amazon.com>
  • Loading branch information
cwperks authored and SuZhou-Joe committed Sep 3, 2024
1 parent bc069d8 commit 02473e1
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ if (Cypress.env('SECURITY_ENABLED') && Cypress.env('AGGREGATION_VIEW')) {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
cy.createTenant(tenantName, tenantDescription);

cy.createIndexPattern('index-pattern1', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const tenantName = 'test';
if (Cypress.env('SECURITY_ENABLED')) {
describe('Multi Tenancy Default Tenant Tests: ', () => {
before(() => {
cy.server();
cy.createTenant(tenantName, tenantDescription);
cy.changeDefaultTenant({
multitenancy_enabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import { TENANTS_MANAGE_PATH } from '../../../utils/dashboards/constants';

if (Cypress.env('SECURITY_ENABLED')) {
describe('Multi Tenancy Tests: ', () => {
before(() => {
cy.server();
});
it('Test Dashboards tenancy features should not be accessible ', () => {
// This test is to ensure tenancy related features are not accessible when opensearch_security.multitenancy.enabled is disabled in the opensearchdashboard.yaml
cy.visit(TENANTS_MANAGE_PATH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const tenantName = 'test';
if (Cypress.env('SECURITY_ENABLED')) {
describe('Multi Tenancy Tests: ', () => {
before(() => {
cy.server();
cy.createTenant(tenantName, tenantDescription);
cy.createIndexPattern(
'index-pattern1',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/audit_log.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Audit logs page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Audit logs page properly', () => {
cy.mockAuditLogsAction(
SEC_AUDIT_FIXTURES_PATH + '/audit_info_response.json',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/auth.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Authc and Authz page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('authentication and authorization section should exist', () => {
cy.mockAuthAction(SEC_FIXTURES_BASE_PATH + '/auth_response.json', () => {
cy.visit(SEC_UI_AUTH_PATH);
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/get_started.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Home(Get Started) page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Home page properly', () => {
cy.visit(BASE_SEC_UI_PATH);

Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/internalusers.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Internal users page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load internal users page properly', () => {
cy.mockInternalUsersAction(
SEC_INTERNALUSERS_FIXTURES_PATH + '/internalusers_info_response.json',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Permissions page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Permissions page properly', () => {
cy.mockPermissionsAction(
SEC_PERMISSIONS_FIXTURES_PATH + '/actiongroups_response.json',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/roles.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Roles page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Roles page properly', () => {
cy.mockRolesAction(
SEC_ROLES_FIXTURES_PATH + '/roles_response.json',
Expand Down
6 changes: 0 additions & 6 deletions cypress/e2e/plugins/security/tenants.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import {

if (Cypress.env('SECURITY_ENABLED')) {
describe('Tenants page', () => {
// start a server so that server responses can be mocked via fixtures
// in all of the below test cases
before(() => {
cy.server();
});

it('should load Tenants page properly', () => {
cy.mockTenantsAction(
SEC_TENANTS_FIXTURES_PATH + '/tenants_info_response.json',
Expand Down

0 comments on commit 02473e1

Please sign in to comment.