[bitnami/*] Move utilities to support folder (#11164)

* Added antiflake pipeline

Signed-off-by: alukic <alukic@vmware.com>

* Diversified the pipeline

Signed-off-by: alukic <alukic@vmware.com>

* Make a change to trigger TKG

Signed-off-by: alukic <alukic@vmware.com>

* Replaced FIPS with normal AKS

Signed-off-by: alukic <alukic@vmware.com>

* Added extra workflow for Grafana Loki

Signed-off-by: alukic <alukic@vmware.com>

* Changed the pipeline

Signed-off-by: alukic <alukic@vmware.com>

* Modified the workflow

Signed-off-by: alukic <alukic@vmware.com>

* Removed Grafana Loki

Signed-off-by: alukic <alukic@vmware.com>

* Reordered files

Signed-off-by: alukic <alukic@vmware.com>

* Remove the pipeline

Signed-off-by: alukic <alukic@vmware.com>

* Removed test files

Signed-off-by: alukic <alukic@vmware.com>

* Applied changes to magento as well

Signed-off-by: alukic <alukic@vmware.com>

* Moved file

Signed-off-by: alukic <alukic@vmware.com>

* Corrected the wrong move

Signed-off-by: alukic <alukic@vmware.com>

* Additionaly correct file movings

Signed-off-by: alukic <alukic@vmware.com>

* Correction for SuiteCRM

Signed-off-by: alukic <alukic@vmware.com>
This commit is contained in:
superaleks
2022-07-18 15:56:21 +02:00
committed by GitHub
parent a49e56897c
commit 1fe4fee1d9
57 changed files with 134 additions and 125 deletions

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows triggering execution of a sample DAG', () => {
cy.login();

View File

@@ -14,7 +14,7 @@
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')

View File

@@ -1,6 +1,6 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
const DATACENTER_NAME = Cypress.env('datacenterName');
const REPLICA_COUNT = Cypress.env('replicaCount');

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows to log in and out', () => {
cy.login();

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows login and logout', () => {
cy.login();

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
import body from '../fixtures/documents.json';
const NODE_NUMBER = Cypress.env('nodeNumber');

View File

@@ -1,5 +1,9 @@
/// <reference types="cypress" />
import { random, getPageUrlFromTitle, getUserFromEmail } from './utils';
import {
random,
getPageUrlFromTitle,
getUserFromEmail,
} from '../support/utils';
it('allows to log in and out', () => {
cy.login();

View File

@@ -1,6 +1,6 @@
/// <reference types="cypress" />
import body from '../fixtures/logs-body.json';
import { lastMinuteTimestamp } from './utils';
import { lastMinuteTimestamp } from '../support/utils';
it('shows build info endpoint', () => {
cy.request({

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random, verifySuccesOfAction } from './utils';
import { random, verifySuccesOfAction } from '../support/utils';
it('allows user to log in and log out', () => {
cy.login();

View File

@@ -14,7 +14,7 @@
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')

View File

@@ -1,64 +1,64 @@
/// <reference types="cypress" />
import { random } from "./utils";
import { random } from '../support/utils';
it("allows user to log in and log out", () => {
it('allows user to log in and log out', () => {
cy.login();
cy.contains("Invalid user name or password").should("not.exist");
cy.contains("button", "admin").click();
cy.contains("Log Out").click();
cy.get("#login_username");
cy.contains('Invalid user name or password').should('not.exist');
cy.contains('button', 'admin').click();
cy.contains('Log Out').click();
cy.get('#login_username');
});
it("allows creating a project", () => {
it('allows creating a project', () => {
cy.login();
cy.visit("/harbor/projects");
cy.fixture("projects").then((project) => {
cy.contains("button", "New Project").click();
cy.get("#create_project_name").type(`${project.newProject.name}-${random}`);
cy.contains("button", "OK").should("not.be.disabled").click();
cy.contains("Created project successfully");
cy.visit('/harbor/projects');
cy.fixture('projects').then((project) => {
cy.contains('button', 'New Project').click();
cy.get('#create_project_name').type(`${project.newProject.name}-${random}`);
cy.contains('button', 'OK').should('not.be.disabled').click();
cy.contains('Created project successfully');
});
});
it("allows creating a registry", () => {
it('allows creating a registry', () => {
cy.login();
cy.visit("/harbor/registries");
cy.fixture("registries").then((registry) => {
cy.contains("button", "New Endpoint").click();
cy.get("#adapter").select(`${registry.newRegistry.provider}`);
cy.get("#destination_name").type(`${registry.newRegistry.name}-${random}`);
cy.contains("button", "OK").should("not.be.disabled").click();
cy.contains(".datagrid-table", `${registry.newRegistry.name}-${random}`);
cy.visit('/harbor/registries');
cy.fixture('registries').then((registry) => {
cy.contains('button', 'New Endpoint').click();
cy.get('#adapter').select(`${registry.newRegistry.provider}`);
cy.get('#destination_name').type(`${registry.newRegistry.name}-${random}`);
cy.contains('button', 'OK').should('not.be.disabled').click();
cy.contains('.datagrid-table', `${registry.newRegistry.name}-${random}`);
});
});
it("allows launching a vulnerability scan", () => {
const IMAGE_SCANNER = "Trivy";
it('allows launching a vulnerability scan', () => {
const IMAGE_SCANNER = 'Trivy';
cy.login();
cy.visit("/harbor/interrogation-services/scanners");
cy.contains(".datagrid-table", IMAGE_SCANNER);
cy.contains("a", "Vulnerability").click();
cy.contains("SCAN NOW").click();
cy.contains("Trigger scan all successfully");
cy.visit('/harbor/interrogation-services/scanners');
cy.contains('.datagrid-table', IMAGE_SCANNER);
cy.contains('a', 'Vulnerability').click();
cy.contains('SCAN NOW').click();
cy.contains('Trigger scan all successfully');
});
it("checks system configurations endpoint", () => {
it('checks system configurations endpoint', () => {
cy.request({
method: "GET",
url: "/api/v2.0/configurations",
method: 'GET',
url: '/api/v2.0/configurations',
form: true,
auth: {
username: Cypress.env("username"),
password: Cypress.env("password"),
username: Cypress.env('username'),
password: Cypress.env('password'),
},
}).then((response) => {
expect(response.status).to.eq(200);
expect(response.body).to.include.all.keys(
"auth_mode",
"email_host",
"project_creation_restriction",
"scan_all_policy",
"self_registration"
'auth_mode',
'email_host',
'project_creation_restriction',
'scan_all_policy',
'self_registration'
);
});
});

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random, checkErrors } from './utils';
import { random, checkErrors } from '../support/utils';
it('allows to create system credentials', () => {
cy.login();

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows user to log in and log out', () => {
cy.login();

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows login/logout', () => {
cy.login();

View File

@@ -1,6 +1,6 @@
/// <reference types="cypress" />
import { closeThePopups, skipTheWelcomeScreen, random } from './utils';
import { closeThePopups, skipTheWelcomeScreen, random } from '../support/utils';
before(() => {
skipTheWelcomeScreen();

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random, allowDataUsage } from './utils';
import { random, allowDataUsage } from '../support/utils';
before(() => {
cy.login();

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows to log in and out', () => {
cy.login();
@@ -12,12 +12,8 @@ it('allows to create user', () => {
cy.visit('/?module=UsersManager&showadduser=1');
cy.fixture('users').then((user) => {
cy.get('#user_login').type(`${user.newUser.username}-${random}`);
cy.get('#user_password').type(
`${user.newUser.password}-${random}`
);
cy.get('#user_password').type(
`${user.newUser.password}-${random}`
);
cy.get('#user_password').type(`${user.newUser.password}-${random}`);
cy.get('#user_password').type(`${user.newUser.password}-${random}`);
cy.get('#user_email').type(`${random}_${user.newUser.email}`);
cy.get('input[value*="Create user"]').click();
cy.contains('changes have been saved');
@@ -34,8 +30,12 @@ it('allows to create a new website', () => {
cy.get('button[title*="A website"]').click();
cy.fixture('websites').then((site) => {
// The name input has no attribute "name" or "id"
cy.get('input[placeholder="Name"]').type(`${site.newSite.name} ${random}`, { force: true });
cy.get('textarea[name="urls"]').type(`${site.newSite.url}`, { force: true });
cy.get('input[placeholder="Name"]').type(`${site.newSite.name} ${random}`, {
force: true,
});
cy.get('textarea[name="urls"]').type(`${site.newSite.url}`, {
force: true,
});
});
cy.get('input[type="submit"]').click();
cy.contains('Website created');
@@ -51,15 +51,18 @@ it('allows to use the API', () => {
cy.get('#description').type(random);
cy.get('input[type="submit"]').click();
cy.contains('Token successfully generated');
cy.get('code').invoke('text').then((apiToken) => {
cy.request(
'/index.php?module=API&method=API.getMatomoVersion'
+ `&format=JSON&token_auth=${apiToken}`).then((response) => {
cy.get('code')
.invoke('text')
.then((apiToken) => {
cy.request(
'/index.php?module=API&method=API.getMatomoVersion' +
`&format=JSON&token_auth=${apiToken}`
).then((response) => {
const bodyString = JSON.stringify(response.body);
expect(response.status).to.eq(200);
expect(bodyString).to.contain('"value":');
});
});
});
});
it('allows to change users settings', () => {

View File

@@ -1,9 +1,9 @@
/// <reference types="cypress" />
import { random, getPageUrlFromTitle, confirmLogOut } from './utils';
import { random, getPageUrlFromTitle, confirmLogOut } from '../support/utils';
it('allows to log in and out', () => {
cy.login();
cy.contains('li','Preferences')
cy.contains('li', 'Preferences');
cy.contains('Log out').click();
confirmLogOut();
cy.contains('You are now logged out');
@@ -45,12 +45,9 @@ it('allows to create a new page', () => {
it('allows to upload a file', () => {
cy.login();
cy.visit('/wiki/Special:Upload');
cy.get('#wpUploadFile').selectFile(
'cypress/fixtures/images/post_image.png',
{
force: true,
}
);
cy.get('#wpUploadFile').selectFile('cypress/fixtures/images/post_image.png', {
force: true,
});
// We'll use a random fileName to bypass duplication-related errors
cy.get('input[name="wpDestFile"]').type(`${random}.png`);
// If Mediawiki detects that an identical file was already uploaded

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows user to log in and log out', () => {
cy.login();

View File

@@ -14,7 +14,7 @@
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'
import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows a user to register', () => {
cy.visit('/index.php?route=account/login');

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows creating a folder and uploading a file ', () => {
cy.login();

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows the user to log in and log out', () => {
cy.login();
@@ -12,7 +12,9 @@ it('allows creating a database and a table', () => {
cy.login();
cy.visit('index.php?route=/server/databases');
cy.fixture('testdata').then((td) => {
cy.get('#text_create_db').type(`${td.databaseName}.${random}`, { force: true });
cy.get('#text_create_db').type(`${td.databaseName}.${random}`, {
force: true,
});
cy.get('#buttonGo').click({ force: true });
cy.get('.lock-page [type="text"]').type(`${td.tableName}.${random}`);
cy.get('.lock-page [type="number"]').clear().type(td.columnNumber);

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
// Note: Interaction with the UI is preferred over cy.visit() as
// PrestaShop requires to provide a token within the URL or else

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows login/logout', () => {
cy.login();

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows admin to login/logout', () => {
cy.login();

View File

@@ -1,37 +1,37 @@
/// <reference types="cypress" />
import { random, getBasicAuthHeader } from "../support/utils";
import { random, getBasicAuthHeader } from '../support/utils';
it("allows accessing the Dashboard", () => {
it('allows accessing the Dashboard', () => {
cy.login();
cy.visit("/solr/#/");
cy.contains("Unauthorized").should("not.exist");
cy.visit('/solr/#/');
cy.contains('Unauthorized').should('not.exist');
cy.contains("solr-spec");
cy.contains("JVM");
cy.contains("solr.install.dir=/opt/bitnami/solr");
cy.contains('solr-spec');
cy.contains('JVM');
cy.contains('solr.install.dir=/opt/bitnami/solr');
});
it("checks all nodes are up", () => {
it('checks all nodes are up', () => {
const NUMBER_OF_NODES = 3;
cy.login();
cy.visit("/solr/#/~cloud");
cy.visit('/solr/#/~cloud');
cy.get("table#nodes-table").within(() => {
cy.get('div[class*="host-name"]').should("have.length", NUMBER_OF_NODES);
cy.get('table#nodes-table').within(() => {
cy.get('div[class*="host-name"]').should('have.length', NUMBER_OF_NODES);
});
});
it("allows registering a user", () => {
it('allows registering a user', () => {
cy.login();
cy.visit("/solr/#/~security");
cy.visit('/solr/#/~security');
cy.fixture("users").then((users) => {
cy.contains("button", "Add User").click();
cy.get("input#add_user").type(`${users.newUser.username}.${random}`);
cy.get("input#add_user_password").type(users.newUser.password);
cy.get("input#add_user_password2").type(users.newUser.password);
cy.contains("button", "Add User").click();
cy.contains("td", `${users.newUser.username}.${random}`);
cy.fixture('users').then((users) => {
cy.contains('button', 'Add User').click();
cy.get('input#add_user').type(`${users.newUser.username}.${random}`);
cy.get('input#add_user_password').type(users.newUser.password);
cy.get('input#add_user_password2').type(users.newUser.password);
cy.contains('button', 'Add User').click();
cy.contains('td', `${users.newUser.username}.${random}`);
});
});
@@ -40,42 +40,42 @@ it("allows registering a user", () => {
* Cypress seems to struggle setting the Content-Type header to application/json
* and the server refuses to process a octet-stream object. Use the API instead.
*/
it("allows uploading and indexing a file", () => {
cy.fixture("books").then(($books) => {
it('allows uploading and indexing a file', () => {
cy.fixture('books').then(($books) => {
const formData = new FormData();
var content = new Blob([JSON.stringify($books)], {
type: "application/json",
type: 'application/json',
});
formData.set("user-file", content, "data.js");
formData.set('user-file', content, 'data.js');
cy.request({
url: "/solr/my-collection/update",
url: '/solr/my-collection/update',
qs: {
commitWithin: 1000,
overwrite: true,
commit: true,
wt: "json",
wt: 'json',
},
method: "POST",
method: 'POST',
headers: {
Authorization: getBasicAuthHeader(),
},
body: formData,
})
.its("status")
.should("be.equal", 200);
.its('status')
.should('be.equal', 200);
});
cy.fixture("books").then(($books) => {
cy.fixture('books').then(($books) => {
// Get an arbitrary book from the collection
var book = $books[Math.floor(Math.random() * $books.length)];
cy.request({
url: "/solr/my-collection/query",
url: '/solr/my-collection/query',
qs: {
q: `title:${book.title}`,
"q.op": "OR",
'q.op': 'OR',
indent: true,
},
method: "GET",
method: 'GET',
headers: {
Authorization: getBasicAuthHeader(),
},
@@ -88,10 +88,10 @@ it("allows uploading and indexing a file", () => {
});
});
it("allows retrieving sample schema", () => {
it('allows retrieving sample schema', () => {
cy.request({
url: "/solr/my-collection/schema",
method: "GET",
url: '/solr/my-collection/schema',
method: 'GET',
headers: {
Authorization: getBasicAuthHeader(),
},
@@ -99,6 +99,6 @@ it("allows retrieving sample schema", () => {
var bodyString = JSON.stringify(response.body);
expect(response.status).to.eq(200);
expect(bodyString).to.contain('"name":"text_es"');
expect(bodyString).to.contain("queryAnalyzer");
expect(bodyString).to.contain('queryAnalyzer');
});
});

View File

@@ -1,6 +1,9 @@
/// <reference types="cypress" />
import { random } from './utils.js';
import { importAnApplication, createATask } from './prepare_app_state.js';
import { random } from '../support/utils.js';
import {
importAnApplication,
createATask,
} from '../support/prepare_app_state.js';
it('allows getting Spring Cloud Dataflow info', () => {
cy.visit('/dashboard');

View File

@@ -1,5 +1,5 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows to log in/log out', () => {
cy.login();

View File

@@ -1,6 +1,6 @@
/// <reference types="cypress" />
import { random } from './utils';
import { random } from '../support/utils';
it('allows login/logout', () => {
cy.login();