Skip to content

Commit

Permalink
Solved the kntive test issue when instances are not present
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket Pathak committed Sep 25, 2024
1 parent 66f484d commit 3b6edd9
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { operatorNamespaces, operatorSubscriptions } from '../../constants';
import {
createKnativeEventingUsingCLI,
createKnativeKafkaUsingCLI,
createKnativeServingUsingCLI,
} from './knativeSubscriptions';

export const checkRedHatIntegrationCamelKOperatorStatus = (retries: number = 5) => {
const namespace = operatorNamespaces.RedHatIntegrationCamelK;
Expand Down Expand Up @@ -125,8 +130,12 @@ export const checkKnativeOperatorStatus = () => {
).then(function (result) {
if (result.stdout.includes('condition met')) {
cy.log(result.stdout);
} else {
throw new Error(result.stderr);
} else if (resourceName === 'KnativeServing') {
createKnativeServingUsingCLI();
} else if (resourceName === 'KnativeEventing') {
createKnativeEventingUsingCLI();
} else if (resourceName === 'KnativeKafka') {
createKnativeKafkaUsingCLI();
}
});
};
Expand Down

0 comments on commit 3b6edd9

Please sign in to comment.