diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-15 15:08:32 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-15 15:08:32 +0000 |
commit | 9044365a91112d426fbbfba07eca595652bbe2df (patch) | |
tree | a46df8721ca37ef4336375c201f783b4392f385a /spec | |
parent | 0820b29dca14bd22c2cee6d9ee2900b64385bfa6 (diff) | |
download | gitlab-ce-9044365a91112d426fbbfba07eca595652bbe2df.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
3 files changed, 38 insertions, 2 deletions
diff --git a/spec/frontend/error_tracking/components/stacktrace_entry_spec.js b/spec/frontend/error_tracking/components/stacktrace_entry_spec.js index 942585d5370..2a4e826b4ab 100644 --- a/spec/frontend/error_tracking/components/stacktrace_entry_spec.js +++ b/spec/frontend/error_tracking/components/stacktrace_entry_spec.js @@ -46,8 +46,8 @@ describe('Stacktrace Entry', () => { expect(wrapper.findAll('.line_content.old').length).toBe(1); }); - describe('no code block', () => { - const findFileHeaderContent = () => wrapper.find('.file-header-content').html(); + describe('entry caption', () => { + const findFileHeaderContent = () => wrapper.find('.file-header-content').text(); it('should hide collapse icon and render error fn name and error line when there is no code block', () => { const extraInfo = { errorLine: 34, errorFn: 'errorFn', errorColumn: 77 }; diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 21644ea5dec..38e15fc4582 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -341,6 +341,36 @@ describe Ci::Build do end end + describe '#enqueue_preparing' do + let(:build) { create(:ci_build, :preparing) } + + subject { build.enqueue_preparing } + + before do + allow(build).to receive(:any_unmet_prerequisites?).and_return(has_unmet_prerequisites) + end + + context 'build completed prerequisites' do + let(:has_unmet_prerequisites) { false } + + it 'transitions to pending' do + subject + + expect(build).to be_pending + end + end + + context 'build did not complete prerequisites' do + let(:has_unmet_prerequisites) { true } + + it 'remains in preparing' do + subject + + expect(build).to be_preparing + end + end + end + describe '#actionize' do context 'when build is a created' do before do diff --git a/spec/services/clusters/applications/check_installation_progress_service_spec.rb b/spec/services/clusters/applications/check_installation_progress_service_spec.rb index 7b37eb97800..2f224d40920 100644 --- a/spec/services/clusters/applications/check_installation_progress_service_spec.rb +++ b/spec/services/clusters/applications/check_installation_progress_service_spec.rb @@ -160,6 +160,12 @@ describe Clusters::Applications::CheckInstallationProgressService, '#execute' do expect(application).to be_installed expect(application.status_reason).to be_nil end + + it 'tracks application install' do + expect(Gitlab::Tracking).to receive(:event).with('cluster:applications', "cluster_application_helm_installed") + + service.execute + end end context 'when installation POD failed' do |