Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 03:08:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-14 03:08:14 +0300
commit427c549b6396885fb60a687326b6cd62878e4ca3 (patch)
tree145713e2f6fdaf7499b0cb44010503e16b6248b9 /spec/frontend/clusters
parent74a89b1221eaf780374bd1d4c5b2ee4a0f488908 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/clusters')
-rw-r--r--spec/frontend/clusters/components/applications_spec.js66
-rw-r--r--spec/frontend/clusters/services/mock_data.js2
-rw-r--r--spec/frontend/clusters/stores/clusters_store_spec.js12
3 files changed, 11 insertions, 69 deletions
diff --git a/spec/frontend/clusters/components/applications_spec.js b/spec/frontend/clusters/components/applications_spec.js
index e8c5a2bd242..a646ea8c700 100644
--- a/spec/frontend/clusters/components/applications_spec.js
+++ b/spec/frontend/clusters/components/applications_spec.js
@@ -199,7 +199,7 @@ describe('Applications', () => {
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub', hostname: '' },
knative: { title: 'Knative', hostname: '' },
- elastic_stack: { title: 'Elastic Stack', kibana_hostname: '' },
+ elastic_stack: { title: 'Elastic Stack' },
},
});
@@ -433,81 +433,35 @@ describe('Applications', () => {
});
describe('Elastic Stack application', () => {
- describe('with ingress installed with ip & elastic stack installable', () => {
+ describe('with elastic stack installable', () => {
it('renders hostname active input', () => {
vm = mountComponent(Applications, {
applications: {
...APPLICATIONS_MOCK_STATE,
- ingress: {
- title: 'Ingress',
- status: 'installed',
- externalIp: '1.1.1.1',
- },
},
});
expect(
vm.$el
- .querySelector('.js-cluster-application-row-elastic_stack .js-hostname')
- .getAttribute('readonly'),
- ).toEqual(null);
- });
- });
-
- describe('with ingress installed without external ip', () => {
- it('does not render hostname input', () => {
- vm = mountComponent(Applications, {
- applications: {
- ...APPLICATIONS_MOCK_STATE,
- ingress: { title: 'Ingress', status: 'installed' },
- },
- });
-
- expect(vm.$el.querySelector('.js-cluster-application-row-elastic_stack .js-hostname')).toBe(
- null,
- );
+ .querySelector(
+ '.js-cluster-application-row-elastic_stack .js-cluster-application-install-button',
+ )
+ .getAttribute('disabled'),
+ ).toEqual('disabled');
});
});
- describe('with ingress & elastic stack installed', () => {
- it('renders readonly input', () => {
+ describe('elastic stack installed', () => {
+ it('renders uninstall button', () => {
vm = mountComponent(Applications, {
applications: {
...APPLICATIONS_MOCK_STATE,
- ingress: {
- title: 'Ingress',
- status: 'installed',
- externalIp: '1.1.1.1',
- modsecurity_enabled: false,
- },
- elastic_stack: { title: 'Elastic Stack', status: 'installed', kibana_hostname: '' },
+ elastic_stack: { title: 'Elastic Stack', status: 'installed' },
},
});
expect(
vm.$el
- .querySelector('.js-cluster-application-row-elastic_stack .js-hostname')
- .getAttribute('readonly'),
- ).toEqual('readonly');
- });
- });
-
- describe('without ingress installed', () => {
- beforeEach(() => {
- vm = mountComponent(Applications, {
- applications: APPLICATIONS_MOCK_STATE,
- });
- });
-
- it('does not render input', () => {
- expect(vm.$el.querySelector('.js-cluster-application-row-elastic_stack .js-hostname')).toBe(
- null,
- );
- });
-
- it('renders disabled install button', () => {
- expect(
- vm.$el
.querySelector(
'.js-cluster-application-row-elastic_stack .js-cluster-application-install-button',
)
diff --git a/spec/frontend/clusters/services/mock_data.js b/spec/frontend/clusters/services/mock_data.js
index 98fa0ec3b07..f0bcf5d980f 100644
--- a/spec/frontend/clusters/services/mock_data.js
+++ b/spec/frontend/clusters/services/mock_data.js
@@ -157,7 +157,7 @@ const APPLICATIONS_MOCK_STATE = {
prometheus: { title: 'Prometheus' },
jupyter: { title: 'JupyterHub', status: 'installable', hostname: '' },
knative: { title: 'Knative ', status: 'installable', hostname: '' },
- elastic_stack: { title: 'Elastic Stack', status: 'installable', kibana_hostname: '' },
+ elastic_stack: { title: 'Elastic Stack', status: 'installable' },
};
export { CLUSTERS_MOCK_DATA, DEFAULT_APPLICATION_STATE, APPLICATIONS_MOCK_STATE };
diff --git a/spec/frontend/clusters/stores/clusters_store_spec.js b/spec/frontend/clusters/stores/clusters_store_spec.js
index c7ec4ddc464..f2dbdd0638b 100644
--- a/spec/frontend/clusters/stores/clusters_store_spec.js
+++ b/spec/frontend/clusters/stores/clusters_store_spec.js
@@ -167,7 +167,6 @@ describe('Clusters Store', () => {
installFailed: true,
statusReason: mockResponseData.applications[7].status_reason,
requestReason: null,
- kibana_hostname: '',
installed: false,
uninstallable: false,
uninstallSuccessful: false,
@@ -216,16 +215,5 @@ describe('Clusters Store', () => {
`jupyter.${store.state.applications.ingress.externalIp}.nip.io`,
);
});
-
- it('sets default hostname for elastic stack when ingress has a ip address', () => {
- const mockResponseData =
- CLUSTERS_MOCK_DATA.GET['/gitlab-org/gitlab-shell/clusters/2/status.json'].data;
-
- store.updateStateFromServer(mockResponseData);
-
- expect(store.state.applications.elastic_stack.kibana_hostname).toEqual(
- `kibana.${store.state.applications.ingress.externalIp}.nip.io`,
- );
- });
});
});