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>2021-01-19 12:10:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-19 12:10:32 +0300
commitfcef382cb994b8ecdbff75490bab0425a35f2641 (patch)
tree1789e9bbda6c4beea4451feb7970705296787445 /spec/requests
parentb8f44765693d6f6e4c8df6ab7b7c7b1141f83b26 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/lint_spec.rb4
-rw-r--r--spec/requests/api/projects_spec.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/requests/api/lint_spec.rb b/spec/requests/api/lint_spec.rb
index aecbcfb5b5a..2653653c896 100644
--- a/spec/requests/api/lint_spec.rb
+++ b/spec/requests/api/lint_spec.rb
@@ -63,7 +63,7 @@ RSpec.describe API::Lint do
end
context 'with invalid configuration' do
- let(:yaml_content) { '{ image: "ruby:2.7", services: ["postgres"] }' }
+ let(:yaml_content) { '{ image: "ruby:2.7", services: ["postgres"], invalid }' }
it 'responds with errors about invalid configuration' do
post api('/ci/lint'), params: { content: yaml_content }
@@ -71,7 +71,7 @@ RSpec.describe API::Lint do
expect(response).to have_gitlab_http_status(:ok)
expect(json_response['status']).to eq('invalid')
expect(json_response['warnings']).to eq([])
- expect(json_response['errors']).to eq(['jobs config should contain at least one visible job'])
+ expect(json_response['errors']).to eq(['jobs invalid config should implement a script: or a trigger: keyword', 'jobs config should contain at least one visible job'])
end
it 'outputs expanded yaml content' do
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index 72f2dc79633..4acd0eea448 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -3394,10 +3394,10 @@ RSpec.describe API::Projects do
end
describe 'POST /projects/:id/housekeeping' do
- let(:housekeeping) { Projects::HousekeepingService.new(project) }
+ let(:housekeeping) { Repositories::HousekeepingService.new(project) }
before do
- allow(Projects::HousekeepingService).to receive(:new).with(project, :gc).and_return(housekeeping)
+ allow(Repositories::HousekeepingService).to receive(:new).with(project, :gc).and_return(housekeeping)
end
context 'when authenticated as owner' do
@@ -3411,12 +3411,12 @@ RSpec.describe API::Projects do
context 'when housekeeping lease is taken' do
it 'returns conflict' do
- expect(housekeeping).to receive(:execute).once.and_raise(Projects::HousekeepingService::LeaseTaken)
+ expect(housekeeping).to receive(:execute).once.and_raise(Repositories::HousekeepingService::LeaseTaken)
post api("/projects/#{project.id}/housekeeping", user)
expect(response).to have_gitlab_http_status(:conflict)
- expect(json_response['message']).to match(/Somebody already triggered housekeeping for this project/)
+ expect(json_response['message']).to match(/Somebody already triggered housekeeping for this resource/)
end
end
end