Commit 922e0d8b authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 90114f0b a6701647
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import ciHeader from '../../vue_shared/components/header_ci_component.vue'; import ciHeader from '../../vue_shared/components/header_ci_component.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import { __ } from '~/locale';
export default { export default {
name: 'PipelineHeaderSection', name: 'PipelineHeaderSection',
...@@ -54,7 +55,7 @@ export default { ...@@ -54,7 +55,7 @@ export default {
if (this.pipeline.retry_path) { if (this.pipeline.retry_path) {
actions.push({ actions.push({
label: 'Retry', label: __('Retry'),
path: this.pipeline.retry_path, path: this.pipeline.retry_path,
cssClass: 'js-retry-button btn btn-inverted-secondary', cssClass: 'js-retry-button btn btn-inverted-secondary',
type: 'button', type: 'button',
...@@ -64,7 +65,7 @@ export default { ...@@ -64,7 +65,7 @@ export default {
if (this.pipeline.cancel_path) { if (this.pipeline.cancel_path) {
actions.push({ actions.push({
label: 'Cancel running', label: __('Cancel running'),
path: this.pipeline.cancel_path, path: this.pipeline.cancel_path,
cssClass: 'js-btn-cancel-pipeline btn btn-danger', cssClass: 'js-btn-cancel-pipeline btn btn-danger',
type: 'button', type: 'button',
......
...@@ -94,9 +94,8 @@ export default { ...@@ -94,9 +94,8 @@ export default {
tabindex="0" tabindex="0"
class="js-pipeline-url-autodevops badge badge-info autodevops-badge" class="js-pipeline-url-autodevops badge badge-info autodevops-badge"
role="button" role="button"
>{{ __('Auto DevOps') }}</gl-link
> >
Auto DevOps
</gl-link>
<span v-if="pipeline.flags.stuck" class="js-pipeline-url-stuck badge badge-warning"> <span v-if="pipeline.flags.stuck" class="js-pipeline-url-stuck badge badge-warning">
{{ __('stuck') }} {{ __('stuck') }}
</span> </span>
......
...@@ -2424,6 +2424,9 @@ msgstr "" ...@@ -2424,6 +2424,9 @@ msgstr ""
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
msgid "Cancel running"
msgstr ""
msgid "Cancel this job" msgid "Cancel this job"
msgstr "" msgstr ""
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require 'rake' require 'rake'
describe 'schema_version_check rake task', :quarantine do describe 'schema_version_check rake task' do
include StubENV include StubENV
before :all do before :all do
...@@ -15,8 +15,6 @@ describe 'schema_version_check rake task', :quarantine do ...@@ -15,8 +15,6 @@ describe 'schema_version_check rake task', :quarantine do
end end
before do before do
# Stub out db tasks
allow(ActiveRecord::Tasks::DatabaseTasks).to receive(:migrate).and_return(true)
allow(ActiveRecord::Migrator).to receive(:current_version).and_return(Gitlab::Database::MIN_SCHEMA_VERSION) allow(ActiveRecord::Migrator).to receive(:current_version).and_return(Gitlab::Database::MIN_SCHEMA_VERSION)
# Ensure our check can re-run each time # Ensure our check can re-run each time
...@@ -24,23 +22,23 @@ describe 'schema_version_check rake task', :quarantine do ...@@ -24,23 +22,23 @@ describe 'schema_version_check rake task', :quarantine do
end end
it 'allows migrations on databases meeting the min schema version requirement' do it 'allows migrations on databases meeting the min schema version requirement' do
expect { run_rake_task('db:migrate') }.not_to raise_error expect { run_rake_task('schema_version_check') }.not_to raise_error
end end
it 'raises an error when schema version is too old to migrate' do it 'raises an error when schema version is too old to migrate' do
allow(ActiveRecord::Migrator).to receive(:current_version).and_return(25) allow(ActiveRecord::Migrator).to receive(:current_version).and_return(25)
expect { run_rake_task('db:migrate') }.to raise_error(RuntimeError, /current database version is too old to be migrated/) expect { run_rake_task('schema_version_check') }.to raise_error(RuntimeError, /current database version is too old to be migrated/)
end end
it 'skips running validation when passed the skip env variable' do it 'skips running validation when passed the skip env variable' do
stub_env('SKIP_SCHEMA_VERSION_CHECK', 'true') stub_env('SKIP_SCHEMA_VERSION_CHECK', 'true')
allow(ActiveRecord::Migrator).to receive(:current_version).and_return(25) allow(ActiveRecord::Migrator).to receive(:current_version).and_return(25)
expect { run_rake_task('db:migrate') }.not_to raise_error expect { run_rake_task('schema_version_check') }.not_to raise_error
end end
it 'allows migrations on fresh databases' do it 'allows migrations on fresh databases' do
allow(ActiveRecord::Migrator).to receive(:current_version).and_return(0) allow(ActiveRecord::Migrator).to receive(:current_version).and_return(0)
expect { run_rake_task('db:migrate') }.not_to raise_error expect { run_rake_task('schema_version_check') }.not_to raise_error
end end
def run_rake_task(task_name) def run_rake_task(task_name)
......
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