diff --git a/packages/dashboard-frontend/src/services/backend-client/__tests__/kubernetesNamespaceApi.spec.tsx b/packages/dashboard-frontend/src/services/backend-client/__tests__/kubernetesNamespaceApi.spec.tsx index 2420f8435..88125d433 100644 --- a/packages/dashboard-frontend/src/services/backend-client/__tests__/kubernetesNamespaceApi.spec.tsx +++ b/packages/dashboard-frontend/src/services/backend-client/__tests__/kubernetesNamespaceApi.spec.tsx @@ -53,7 +53,7 @@ describe('Kubernetes namespace API', () => { await provisionKubernetesNamespace(); expect(mockGet).not.toBeCalled(); - expect(mockPost).toBeCalledWith('/api/kubernetes/namespace/provision'); + expect(mockPost).toBeCalledWith('/api/kubernetes/namespace/provision', undefined, undefined); }); it('should return a list of namespaces', async () => { diff --git a/packages/dashboard-frontend/src/services/backend-client/kubernetesNamespaceApi.ts b/packages/dashboard-frontend/src/services/backend-client/kubernetesNamespaceApi.ts index 63afb7500..091d501ba 100644 --- a/packages/dashboard-frontend/src/services/backend-client/kubernetesNamespaceApi.ts +++ b/packages/dashboard-frontend/src/services/backend-client/kubernetesNamespaceApi.ts @@ -10,8 +10,6 @@ * Red Hat, Inc. - initial API and implementation */ -import axios from 'axios'; - import { AxiosWrapper } from '@/services/backend-client/axiosWrapper'; import { cheServerPrefix } from '@/services/backend-client/const'; @@ -24,7 +22,9 @@ export async function getKubernetesNamespace(): Promise { - const response = await axios.post(`${cheServerPrefix}/kubernetes/namespace/provision`); + const response = await AxiosWrapper.createToRetryAnyErrors().post( + `${cheServerPrefix}/kubernetes/namespace/provision`, + ); return response.data; }