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

Adding traefik test #108

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion tests/cypress/e2e/unit_tests/p0_fleet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const path = "nginx"
beforeEach(() => {
cy.login();
cy.visit('/');
cy.deleteAllFleetRepos();
// cy.deleteAllFleetRepos();
});


Expand All @@ -47,6 +47,29 @@ describe('Test Fleet deployment on PUBLIC repos', { tags: '@p0' }, () => {
cy.deleteAllFleetRepos();
})
);

qase(115,
it.only('FLEET-115: Deploy "Traefik" application on "kube-system" namespace to local cluster', { tags: '@fleet-115' }, () => {

const repoName = "local-cluster-fleet-115"
const branch = "main"
let appName, path
appName = path = "traefik"
const repoUrl = "https://github.com/sbulage/test-fleet"
const namespace = "kube-system"

cy.fleetNamespaceToggle('fleet-local');
cy.addFleetGitRepo({ repoName, repoUrl, branch, path, keepResources: 'yes' });
cy.clickButton('Create');
cy.checkGitRepoStatus(repoName, '1 / 1', '7 / 7');
cy.verifyTableRow(1, 'Service', 'traefik');
cy.verifyTableRow(3, 'IngressRoute', 'traefik-dashboard');
cy.verifyTableRow(5, 'ClusterRole', 'traefik-kube-system');
cy.deleteAllFleetRepos();
cy.checkApplicationStatus(appName, namespace);
})
);

});

describe('Test Fleet deployment on PRIVATE repos with HTTP auth', { tags: '@p0' }, () => {
Expand Down
8 changes: 7 additions & 1 deletion tests/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,16 @@ Cypress.Commands.add('checkGitRepoStatus', (repoName, bundles, resources) => {
});

// Check deployed application status (present or not)
Cypress.Commands.add('checkApplicationStatus', (appName, clusterName='local') => {
Cypress.Commands.add('checkApplicationStatus', (appName, namespace, clusterName='local') => {
cypressLib.burgerMenuToggle();
cypressLib.accesMenu(clusterName);
cy.clickNavMenu(['Workloads', 'Pods']);
if (namespace) {
cy.nameSpaceMenuToggle(namespace);
}
// Type application name in filter
let newAppName = new RegExp(appName + "(?=.*[a-zA-Z])(?=.*[0-9])[A-Za-z0-9]+")
cy.get('.search.row').should('exist').type(newAppName);
cy.contains('tr.main-row[data-testid="sortable-table-0-row"]').should('not.be.empty', { timeout: 25000 });
cy.get(`table > tbody > tr.main-row[data-testid="sortable-table-0-row"]`)
.children({ timeout: 60000 })
Expand Down
Loading