Skip to content

Commit

Permalink
removed server IP dependancy
Browse files Browse the repository at this point in the history
Signed-off-by: Chaitali Mane <cmane@progress.com>
  • Loading branch information
chaitali-mane committed Feb 8, 2022
1 parent 5ef74c2 commit 9586af7
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe('chef server', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
// const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const tabNames = [
Expand All @@ -34,7 +33,7 @@ describe('chef server', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
// ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((resp) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ describe('chef server details', () => {
const serverName = `${cypressPrefix} server ${now}`;
const updatedServerName = `${cypressPrefix} updated server ${now}`;
const serverID = serverName.split(' ').join('-');
const customServerID = `${cypressPrefix}-custom-id-${now}`;
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
const orgName = `${cypressPrefix} org ${now}`;
const generatedOrgID = orgName.split(' ').join('-');
Expand All @@ -30,7 +28,7 @@ describe('chef server details', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
});
Expand Down Expand Up @@ -237,7 +235,7 @@ describe('chef server details', () => {
cy.get('app-notification.info chef-icon').click({ multiple: true });
});

it('can update the server', () => {
xit('can update the server', () => {
cy.get('[data-cy=update-server-name]').clear().type(updatedServerName);
cy.get('chef-select').contains('FQDN').click();
cy.get('chef-select chef-option').contains('IP Address').click();
Expand Down
15 changes: 3 additions & 12 deletions e2e/cypress/integration/ui/infra-proxy/chef-servers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,9 @@ describe('chef server', () => {
const serverName = `${cypressPrefix} server ${now}`;
const generatedServerID = serverName.split(' ').join('-');
const customServerID = `${cypressPrefix}-custom-id-${now}`;
// const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
// const serverIP = '18-117-112-129';
// const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');

const serverID = 'cs';
// const serverName = 'cs';
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = 'ec2-18-219-27-165.us-east-2.compute.amazonaws.com';
const serverIP = '18-219-27-165';
const webuiKey = '-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEA5uYiYBuxNaTrnIuZ5Tr74eWgZlKU1QOhMxR7MzDlaOgJHYXg\n8w7XLDLnADC38tVfM5/2JXDjKkVJoFHGsRxpuUETBJdyUOJ4+t4SjDnuuTS1MT/g\nN6fkTweUpVhmde+btN8paqbM92iVTuD+24X4weV+HDrR2wt9CTY2L/5cjLTTbCbP\nfclGl5ZlUFMxhb+86V73RXtwJRXJP97Sl8Y+Srd1reQgyea/sUyia8wEa+vah6Ki\nTV8csillBAXAqoOYnZ/mCKIqIAq24ZS3MiIcj789asR1CkttU+AjJzMN3N/1aemN\nz77tqNjo3m/jBegE35RnGNYazKQciCOXI22ZjwIDAQABAoIBAGrwcUFT8gonXNw/\nJ8KsQ9aG9HgPjVDvAmzW8oxt/AJPXVFoHRxVZkDZPnWvGrMEMbiGQIlstDlyp7vx\nw/VpdGnRgs5gmhhuG5wM2EhL2I28pKKvs9fzEWGs4CKIQ8QhelsV9Gep40o/DM/g\nkwj3DpQ3BuZqM6Ggu4NVsVkfFJwxjnPf7j2gTS/Xx0YkqQhBEEpLtgCEPM3fL3GL\n6kNRlH080l4nWui+2Wrfk6pcKa+xff2QJ/7vaG1KQJYmHy4XkIJnmDznUhjSj+uC\nEgoIEd/yI2GluLvzQXu1OqPevzWhCGE3VcIjJqvu+MgZQblqx2GwyIbtBsCDO22Y\nqC3aLwkCgYEA9l+eMKEdnLi+e6ulknK6WQcZ8zfSSmQSqCV3e413CYZ01FaE5fuP\nUEpnL6mP07kBRuujiPJQxcXX/xbiWOVj+tgO8VJOiSUnU1/r/XgKsl9Ztp2Zyn3m\nRLBfXAm4LGgAeLjSUP786Oi3viybXrrY74arc2uAwGGV6YUmGk9PXMUCgYEA7+u6\n8iCI/hm9LPTYRWdcdYq081oYzcBwVM5vTasDj/dM/8LbwAe0LvnrX3ZJne4WoWpe\nebkM8eKfGBOGOY7NOh1hkViRj3PpclDvd069zakdF4HIKUX+8TxFrVtKSozzRfxz\nqJc6zgeG86le1DV/RFaOMv6IPSFmknqGnpGwKkMCgYARIZLxVLKnbB0qokPQDBQz\nDpBaXh5MN+soL/q/55VIX0YOYbm5+CT98z57jPHISgvxr37ejeLZ7ajYPvIcNk8e\naRmY5B074g56+KeDJ26u+nxVe13vO5PgYNcwoihhRhYKTueo5CIX296y5Y0kKB/f\nf+C6FNaOCfsPkseUesFM9QKBgHG/8gKaKllPGsIV0/QT7WJNQT2fmeLzOk77EQph\n6m53capRWJ7TCDq9gzrfekfGejRNmj1b3ydPqt5fY2QmsGa9R2UB+QFqk2P/u4l1\na8f2RjS+84eeCCGX0fE/NxnhefXUm4FzMg48w18DDlLOimh8IS9MPou9KkSIkwrb\nSArBAoGAe+/H4SRILQHbDZLQT42T5yEQDFHoyBACFRTvpSFDmtH8xf1PypCGg/2a\nU1XNFs402Ka6X79p0quPSlo2U6zO1BquqHImJrdITilBZYL+hFT2naeIroNIrsp+\nrKVnGCtqvJrDXz6P84ff4ho3POgSi2jDMmarmIDkoJZOa5TMR+4=\n-----END RSA PRIVATE KEY-----';
const generatedOrgID = orgName.split(' ').join('-');
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');

before(() => {
cy.adminLogin('/infrastructure/chef-servers').then(() => {
const admin = JSON.parse(<string>localStorage.getItem('chef-automate-user'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe('infra databag', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const databagName = `${cypressPrefix}-databag-${now}-1`;
Expand All @@ -27,7 +26,7 @@ describe('infra databag', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((resp) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ describe('infra node detail', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
Expand All @@ -31,7 +30,7 @@ describe('infra node detail', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe('infra node list', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
Expand All @@ -28,7 +27,7 @@ describe('infra node list', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((resp) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ describe('infra policy details', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
Expand All @@ -30,7 +29,7 @@ describe('infra policy details', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((resp) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe('infra policy file', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
Expand All @@ -28,7 +27,7 @@ describe('infra policy file', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((resp) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ describe('infra policy group details', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
Expand All @@ -30,7 +29,7 @@ describe('infra policy group details', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((resp) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe('infra policy groups', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
Expand All @@ -28,7 +27,7 @@ describe('infra policy groups', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((resp) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe('infra role detail', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
Expand Down Expand Up @@ -37,7 +36,7 @@ describe('infra role detail', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((response) => {
Expand Down
3 changes: 1 addition & 2 deletions e2e/cypress/integration/ui/infra-proxy/infra-roles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe('infra role', () => {
const orgID = 'demoorg';
const orgName = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const adminUser = 'kallol';
const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n');
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');
Expand All @@ -33,7 +32,7 @@ describe('infra role', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
}).then((resp) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,10 @@ describe('chef server details', () => {
const now = Cypress.moment().format('MMDDYYhhmm');
const cypressPrefix = 'infra';
const serverName = `${cypressPrefix} server ${now}`;
const updatedServerName = `${cypressPrefix} updated server ${now}`;
const serverID = serverName.split(' ').join('-');
const customServerID = `${cypressPrefix}-custom-id-${now}`;
const orgID = 'demoorg';
const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN');
const serverIP = '18-117-112-129';
const orgName = `${cypressPrefix} org ${now}`;
const generatedOrgID = orgName.split(' ').join('-');
const customOrgID = `${cypressPrefix}-custom-id-${now}`;
const adminUser = 'test_admin_user';
const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n');

// using dummy admin key value for creating the org
const adminKey = 'Dummy--admin--key';

before(() => {
cy.adminLogin('/').then(() => {
const admin = JSON.parse(<string>localStorage.getItem('chef-automate-user'));
Expand All @@ -31,7 +20,7 @@ describe('chef server details', () => {
id: serverID,
name: serverName,
fqdn: serverFQDN,
ip_address: serverIP,
ip_address: '',
webui_key: webuiKey
}
});
Expand Down

0 comments on commit 9586af7

Please sign in to comment.