Skip to content

Commit

Permalink
Merge pull request #1283 from nachandr/change_order_upgrade_tests
Browse files Browse the repository at this point in the history
[RFR] Fix upgrade test - MTA Operator Log
  • Loading branch information
ibragins authored Dec 18, 2024
2 parents dc9465e + acef761 commit fef3270
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cypress/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1857,15 +1857,11 @@ export function validateTackleCr(): void {
}

export function validateMtaOperatorLog(): void {
let namespace = getNamespace();
cy.wait(30 * SEC);
let command = `oc logs $(oc get pods | grep mta-operator | cut -d " " -f 1) | grep failed | tail -n 1| awk -F 'failed=' '{print $2}'|cut -d " " -f 1`;
let command = `oc logs $(oc get pods -n${namespace} | grep mta-operator | cut -d " " -f 1) -n${namespace} | grep failed | tail -n 1| awk -F 'failed=' '{print $2}'|cut -d " " -f 1`;
getCommandOutput(command).then((result) => {
const failedCount = parseInt(result.stdout.trim());
if (Number.isNaN(failedCount)) {
throw `Debugging output\n
result.stdout: ${result.stdout}EOV\n
failedCount: ${failedCount}EOV`;
}
expect(failedCount).equal(0);
});
}
Expand Down

0 comments on commit fef3270

Please sign in to comment.