Commit c02c1c9e authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'fe-fix-init-create-cluster-spec-timeout' into 'master'

Fix init_create_cluster_spec timing out

See merge request gitlab-org/gitlab!21856
parents 78b1ad16 805f5324
...@@ -3,6 +3,11 @@ import initGkeDropdowns from '~/create_cluster/gke_cluster'; ...@@ -3,6 +3,11 @@ import initGkeDropdowns from '~/create_cluster/gke_cluster';
import initGkeNamespace from '~/create_cluster/gke_cluster_namespace'; import initGkeNamespace from '~/create_cluster/gke_cluster_namespace';
import PersistentUserCallout from '~/persistent_user_callout'; import PersistentUserCallout from '~/persistent_user_callout';
// This import is loaded dynamically in `init_create_cluster`.
// Let's eager import it here so that the first spec doesn't timeout.
// https://gitlab.com/gitlab-org/gitlab/issues/118499
import '~/create_cluster/eks_cluster';
jest.mock('~/create_cluster/gke_cluster', () => jest.fn()); jest.mock('~/create_cluster/gke_cluster', () => jest.fn());
jest.mock('~/create_cluster/gke_cluster_namespace', () => jest.fn()); jest.mock('~/create_cluster/gke_cluster_namespace', () => jest.fn());
jest.mock('~/persistent_user_callout', () => ({ jest.mock('~/persistent_user_callout', () => ({
...@@ -20,10 +25,9 @@ describe('initCreateCluster', () => { ...@@ -20,10 +25,9 @@ describe('initCreateCluster', () => {
}; };
gon = { features: {} }; gon = { features: {} };
}); });
afterEach(() => { afterEach(() => {
initGkeDropdowns.mockReset(); jest.clearAllMocks();
initGkeNamespace.mockReset();
PersistentUserCallout.factory.mockReset();
}); });
describe.each` describe.each`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment