Skip to content

Commit

Permalink
Use v2 for upgrade-risks-prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
gkarat committed Apr 13, 2023
1 parent e369f82 commit 04c790b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/Components/UpgradeRisksTable/UpgradeRisksTable.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const interceptors = {
successful: () =>
cy.intercept(
'GET',
/\/api\/insights-results-aggregator\/v1\/cluster\/.*\/upgrade-risks-prediction/,
/\/api\/insights-results-aggregator\/v2\/cluster\/.*\/upgrade-risks-prediction/,
{
statusCode: 200,
body: upgradeRisksFixtures,
Expand All @@ -41,7 +41,7 @@ const interceptors = {
fixtures.upgrade_recommendation.upgrade_risks_predictors.alerts = [];
cy.intercept(
'GET',
/\/api\/insights-results-aggregator\/v1\/cluster\/.*\/upgrade-risks-prediction/,
/\/api\/insights-results-aggregator\/v2\/cluster\/.*\/upgrade-risks-prediction/,
{
statusCode: 200,
body: fixtures,
Expand All @@ -56,7 +56,7 @@ const interceptors = {
};
cy.intercept(
'GET',
/\/api\/insights-results-aggregator\/v1\/cluster\/.*\/upgrade-risks-prediction/,
/\/api\/insights-results-aggregator\/v2\/cluster\/.*\/upgrade-risks-prediction/,
{
statusCode: 200,
body: fixtures,
Expand All @@ -66,23 +66,23 @@ const interceptors = {
'error, not available': () =>
cy.intercept(
'GET',
/\/api\/insights-results-aggregator\/v1\/cluster\/.*\/upgrade-risks-prediction/,
/\/api\/insights-results-aggregator\/v2\/cluster\/.*\/upgrade-risks-prediction/,
{
statusCode: 503,
}
),
'error, other': () =>
cy.intercept(
'GET',
/\/api\/insights-results-aggregator\/v1\/cluster\/.*\/upgrade-risks-prediction/,
/\/api\/insights-results-aggregator\/v2\/cluster\/.*\/upgrade-risks-prediction/,
{
statusCode: 500,
}
),
'long responding': () =>
cy.intercept(
'GET',
/\/api\/insights-results-aggregator\/v1\/cluster\/.*\/upgrade-risks-prediction/,
/\/api\/insights-results-aggregator\/v2\/cluster\/.*\/upgrade-risks-prediction/,
{
delay: 420000,
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/SmartProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const SmartProxyApi = createApi({
transformResponse: (response) => response?.cluster,
}),
getUpgradeRisks: builder.query({
query: ({ id }) => `v1/cluster/${id}/upgrade-risks-prediction`,
query: ({ id }) => `v2/cluster/${id}/upgrade-risks-prediction`,
}),
}),
});
Expand Down

0 comments on commit 04c790b

Please sign in to comment.