Skip to content

Commit

Permalink
Revert cypress file and logger messages back to namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Elson9 committed Jul 19, 2024
1 parent 88b4845 commit 8ceb7af
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions e2e/cypress/pageObjects/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class HomePage {
cy.get(this.nsDropdownCreateNsBtn).click()
cy.get(this.namespaceNameInput).type(name) // using `platform` as a default ns as its being seeding through feeder
cy.get(this.nsCreateBtn).click()
cy.verifyToastMessage("Gateway "+name+" created!")
cy.verifyToastMessage("Namespace "+name+" created!")
cy.wait(5000) // wait for dropdown to have latest text
cy.get(this.nsDropdown).then(($el) => {
expect($el).contain(name)
Expand Down Expand Up @@ -56,7 +56,7 @@ class HomePage {
cy.wait(1000)
cy.get(this.namespaceNameInput).next('div').then(($ele) => {
let validationMessage = $ele.text()
assert.equal(validationMessage,"Gateway name must be between 5 and 15 alpha-numeric lowercase characters and start and end with an alphabet.")
assert.equal(validationMessage,"Namespace name must be between 5 and 15 alpha-numeric lowercase characters and start and end with an alphabet.")
})
// cy.verifyToastMessage("Namespace create failed")
})
Expand Down
2 changes: 1 addition & 1 deletion src/auth/auth-oauth2-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class Oauth2ProxyAuthStrategy {

res.json({ switch: switched });
} catch (err) {
logger.error('Error clearing gateway %s', err);
logger.error('Error clearing namespace %s', err);
res.status(400).json({ switch: false, error: 'ns_cleared_fail' });
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/services/workflow/delete-namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const DeleteNamespaceValidate = async (
ns: string,
force: boolean
): Promise<void> => {
logger.debug('Validate Deleting Gateway ns=%s', ns);
logger.debug('Validate Deleting Namespace ns=%s', ns);

const gwServices = await lookupServicesByNamespace(context, ns);

Expand Down Expand Up @@ -63,7 +63,7 @@ export const DeleteNamespaceRecordActivity = async (
context: any,
ns: string
): Promise<{ id: string }> => {
logger.debug('Record Activity for Deleting Gateway ns=%s', ns);
logger.debug('Record Activity for Deleting Namespace ns=%s', ns);

const envs = await lookupEnvironmentsByNS(context, ns);

Expand Down Expand Up @@ -98,7 +98,7 @@ export const DeleteNamespace = async (
subjectToken: string,
ns: string
) => {
logger.debug('Deleting Gateway ns=%s', ns);
logger.debug('Deleting Namespace ns=%s', ns);
assert.strictEqual(
typeof ns === 'string' && ns.length > 0,
true,
Expand Down
2 changes: 1 addition & 1 deletion src/services/workflow/validate-active-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const ValidateActiveEnvironment = async (
);
} else if (typeof nsOrgDetails === 'undefined') {
logger.error(
'[dataset] Gateway not found %s',
'[dataset] Namespace not found %s',
envServices.product.namespace
);
addValidationError(
Expand Down
2 changes: 1 addition & 1 deletion src/services/workflow/validate-issuer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const ValidateIssuer = async (
);
if (!privileged) {
logger.warn(
'[%s] Setting shared is only available in privileged gateways',
'[%s] Setting shared is only available in privileged namespaces',
resolvedData['namespace']
);
addValidationError(
Expand Down

0 comments on commit 8ceb7af

Please sign in to comment.