gitlab 4.2.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -2
- data/LICENSE.txt +1 -1
- data/README.md +96 -25
- data/exe/gitlab +5 -1
- data/lib/gitlab/api.rb +8 -3
- data/lib/gitlab/cli.rb +15 -15
- data/lib/gitlab/cli_helpers.rb +63 -61
- data/lib/gitlab/client/access_requests.rb +103 -0
- data/lib/gitlab/client/application_settings.rb +172 -0
- data/lib/gitlab/client/avatar.rb +21 -0
- data/lib/gitlab/client/award_emojis.rb +5 -3
- data/lib/gitlab/client/boards.rb +62 -4
- data/lib/gitlab/client/branches.rb +53 -14
- data/lib/gitlab/client/broadcast_messages.rb +75 -0
- data/lib/gitlab/client/build_variables.rb +78 -9
- data/lib/gitlab/client/builds.rb +13 -11
- data/lib/gitlab/client/commits.rb +89 -19
- data/lib/gitlab/client/container_registry.rb +85 -0
- data/lib/gitlab/client/deployments.rb +34 -0
- data/lib/gitlab/client/environments.rb +5 -3
- data/lib/gitlab/client/epic_issues.rb +23 -0
- data/lib/gitlab/client/epics.rb +73 -0
- data/lib/gitlab/client/events.rb +60 -0
- data/lib/gitlab/client/features.rb +48 -0
- data/lib/gitlab/client/group_badges.rb +88 -0
- data/lib/gitlab/client/group_boards.rb +141 -0
- data/lib/gitlab/client/group_labels.rb +88 -0
- data/lib/gitlab/client/group_milestones.rb +94 -0
- data/lib/gitlab/client/groups.rb +197 -17
- data/lib/gitlab/client/issue_links.rb +48 -0
- data/lib/gitlab/client/issues.rb +98 -4
- data/lib/gitlab/client/jobs.rb +96 -8
- data/lib/gitlab/client/keys.rb +13 -0
- data/lib/gitlab/client/labels.rb +7 -5
- data/lib/gitlab/client/lint.rb +19 -0
- data/lib/gitlab/client/markdown.rb +23 -0
- data/lib/gitlab/client/merge_request_approvals.rb +265 -0
- data/lib/gitlab/client/merge_requests.rb +237 -9
- data/lib/gitlab/client/milestones.rb +19 -5
- data/lib/gitlab/client/namespaces.rb +4 -2
- data/lib/gitlab/client/notes.rb +58 -12
- data/lib/gitlab/client/pipeline_schedules.rb +147 -0
- data/lib/gitlab/client/pipeline_triggers.rb +12 -10
- data/lib/gitlab/client/pipelines.rb +40 -3
- data/lib/gitlab/client/project_badges.rb +85 -0
- data/lib/gitlab/client/project_clusters.rb +83 -0
- data/lib/gitlab/client/project_release_links.rb +76 -0
- data/lib/gitlab/client/project_releases.rb +79 -0
- data/lib/gitlab/client/projects.rb +280 -47
- data/lib/gitlab/client/protected_tags.rb +59 -0
- data/lib/gitlab/client/remote_mirrors.rb +51 -0
- data/lib/gitlab/client/repositories.rb +60 -6
- data/lib/gitlab/client/repository_files.rb +23 -5
- data/lib/gitlab/client/repository_submodules.rb +27 -0
- data/lib/gitlab/client/resource_label_events.rb +82 -0
- data/lib/gitlab/client/resource_state_events.rb +57 -0
- data/lib/gitlab/client/runners.rb +111 -15
- data/lib/gitlab/client/search.rb +66 -0
- data/lib/gitlab/client/services.rb +4 -1
- data/lib/gitlab/client/sidekiq.rb +39 -0
- data/lib/gitlab/client/snippets.rb +8 -4
- data/lib/gitlab/client/system_hooks.rb +9 -7
- data/lib/gitlab/client/tags.rb +15 -14
- data/lib/gitlab/client/templates.rb +100 -0
- data/lib/gitlab/client/todos.rb +7 -5
- data/lib/gitlab/client/user_snippets.rb +114 -0
- data/lib/gitlab/client/users.rb +166 -30
- data/lib/gitlab/client/versions.rb +18 -0
- data/lib/gitlab/client/wikis.rb +79 -0
- data/lib/gitlab/client.rb +49 -12
- data/lib/gitlab/configuration.rb +8 -6
- data/lib/gitlab/error.rb +74 -5
- data/lib/gitlab/file_response.rb +5 -3
- data/lib/gitlab/help.rb +19 -20
- data/lib/gitlab/objectified_hash.rb +27 -10
- data/lib/gitlab/page_links.rb +11 -9
- data/lib/gitlab/paginated_response.rb +37 -24
- data/lib/gitlab/request.rb +42 -53
- data/lib/gitlab/shell.rb +11 -12
- data/lib/gitlab/shell_history.rb +11 -13
- data/lib/gitlab/version.rb +3 -1
- data/lib/gitlab.rb +19 -8
- metadata +50 -395
- data/.gitignore +0 -22
- data/.travis.yml +0 -8
- data/CONTRIBUTING.md +0 -195
- data/Gemfile +0 -4
- data/Rakefile +0 -9
- data/bin/console +0 -10
- data/bin/setup +0 -6
- data/gitlab.gemspec +0 -31
- data/spec/fixtures/board_list.json +0 -1
- data/spec/fixtures/board_lists.json +0 -1
- data/spec/fixtures/boards.json +0 -1
- data/spec/fixtures/branch.json +0 -1
- data/spec/fixtures/branch_delete.json +0 -3
- data/spec/fixtures/branches.json +0 -1
- data/spec/fixtures/build.json +0 -38
- data/spec/fixtures/build_artifacts.json +0 -0
- data/spec/fixtures/build_cancel.json +0 -24
- data/spec/fixtures/build_erase.json +0 -24
- data/spec/fixtures/build_retry.json +0 -24
- data/spec/fixtures/builds.json +0 -78
- data/spec/fixtures/builds_commits.json +0 -64
- data/spec/fixtures/compare_merge_request_diff.json +0 -31
- data/spec/fixtures/empty.json +0 -0
- data/spec/fixtures/environment.json +0 -6
- data/spec/fixtures/environments.json +0 -14
- data/spec/fixtures/error_already_exists.json +0 -1
- data/spec/fixtures/error_project_not_found.json +0 -1
- data/spec/fixtures/get_repository_file.json +0 -1
- data/spec/fixtures/group.json +0 -60
- data/spec/fixtures/group_create.json +0 -1
- data/spec/fixtures/group_create_with_description.json +0 -1
- data/spec/fixtures/group_delete.json +0 -1
- data/spec/fixtures/group_member.json +0 -1
- data/spec/fixtures/group_member_delete.json +0 -1
- data/spec/fixtures/group_member_edit.json +0 -1
- data/spec/fixtures/group_members.json +0 -1
- data/spec/fixtures/group_projects.json +0 -44
- data/spec/fixtures/group_search.json +0 -2
- data/spec/fixtures/groups.json +0 -2
- data/spec/fixtures/issue.json +0 -1
- data/spec/fixtures/issue_award_emoji.json +0 -16
- data/spec/fixtures/issue_award_emojis.json +0 -34
- data/spec/fixtures/issues.json +0 -1
- data/spec/fixtures/job.json +0 -43
- data/spec/fixtures/job_trace.json +0 -1
- data/spec/fixtures/jobs.json +0 -91
- data/spec/fixtures/key.json +0 -1
- data/spec/fixtures/keys.json +0 -1
- data/spec/fixtures/label.json +0 -1
- data/spec/fixtures/label_unsubscribe.json +0 -1
- data/spec/fixtures/labels.json +0 -1
- data/spec/fixtures/merge_request.json +0 -1
- data/spec/fixtures/merge_request_award_emoji.json +0 -16
- data/spec/fixtures/merge_request_award_emojis.json +0 -34
- data/spec/fixtures/merge_request_changes.json +0 -1
- data/spec/fixtures/merge_request_closes_issues.json +0 -1
- data/spec/fixtures/merge_request_comment.json +0 -1
- data/spec/fixtures/merge_request_comments.json +0 -1
- data/spec/fixtures/merge_request_commits.json +0 -1
- data/spec/fixtures/merge_requests.json +0 -1
- data/spec/fixtures/milestone.json +0 -1
- data/spec/fixtures/milestone_issues.json +0 -1
- data/spec/fixtures/milestone_merge_requests.json +0 -1
- data/spec/fixtures/milestones.json +0 -1
- data/spec/fixtures/namespaces.json +0 -1
- data/spec/fixtures/note.json +0 -1
- data/spec/fixtures/note_award_emoji.json +0 -16
- data/spec/fixtures/note_award_emojis.json +0 -18
- data/spec/fixtures/notes.json +0 -1
- data/spec/fixtures/pipeline.json +0 -23
- data/spec/fixtures/pipeline_cancel.json +0 -23
- data/spec/fixtures/pipeline_create.json +0 -23
- data/spec/fixtures/pipeline_jobs.json +0 -91
- data/spec/fixtures/pipeline_retry.json +0 -23
- data/spec/fixtures/pipelines.json +0 -48
- data/spec/fixtures/project.json +0 -1
- data/spec/fixtures/project_commit.json +0 -13
- data/spec/fixtures/project_commit_comment.json +0 -1
- data/spec/fixtures/project_commit_comments.json +0 -1
- data/spec/fixtures/project_commit_create.json +0 -22
- data/spec/fixtures/project_commit_diff.json +0 -10
- data/spec/fixtures/project_commit_status.json +0 -42
- data/spec/fixtures/project_commits.json +0 -1
- data/spec/fixtures/project_edit.json +0 -21
- data/spec/fixtures/project_events.json +0 -1
- data/spec/fixtures/project_for_user.json +0 -1
- data/spec/fixtures/project_fork.json +0 -50
- data/spec/fixtures/project_fork_link.json +0 -1
- data/spec/fixtures/project_forked_for_user.json +0 -50
- data/spec/fixtures/project_hook.json +0 -1
- data/spec/fixtures/project_hooks.json +0 -1
- data/spec/fixtures/project_issues.json +0 -1
- data/spec/fixtures/project_key.json +0 -6
- data/spec/fixtures/project_keys.json +0 -6
- data/spec/fixtures/project_runner_enable.json +0 -7
- data/spec/fixtures/project_runners.json +0 -16
- data/spec/fixtures/project_search.json +0 -1
- data/spec/fixtures/project_star.json +0 -44
- data/spec/fixtures/project_tag_annotated.json +0 -1
- data/spec/fixtures/project_tag_lightweight.json +0 -1
- data/spec/fixtures/project_tags.json +0 -1
- data/spec/fixtures/project_unstar.json +0 -44
- data/spec/fixtures/project_update_commit_status.json +0 -20
- data/spec/fixtures/projects.json +0 -1
- data/spec/fixtures/push_rule.json +0 -1
- data/spec/fixtures/raw_file.json +0 -2
- data/spec/fixtures/release_create.json +0 -1
- data/spec/fixtures/release_update.json +0 -1
- data/spec/fixtures/repository_file.json +0 -1
- data/spec/fixtures/run_trigger.json +0 -1
- data/spec/fixtures/runner.json +0 -26
- data/spec/fixtures/runner_delete.json +0 -7
- data/spec/fixtures/runner_edit.json +0 -26
- data/spec/fixtures/runners.json +0 -16
- data/spec/fixtures/runners_all.json +0 -30
- data/spec/fixtures/service.json +0 -1
- data/spec/fixtures/session.json +0 -1
- data/spec/fixtures/shell_history.json +0 -2
- data/spec/fixtures/snippet.json +0 -1
- data/spec/fixtures/snippet_award_emoji.json +0 -16
- data/spec/fixtures/snippet_award_emojis.json +0 -34
- data/spec/fixtures/snippet_content.json +0 -3
- data/spec/fixtures/snippets.json +0 -1
- data/spec/fixtures/system_hook.json +0 -1
- data/spec/fixtures/system_hooks.json +0 -1
- data/spec/fixtures/tag.json +0 -1
- data/spec/fixtures/tag_create.json +0 -1
- data/spec/fixtures/tag_create_with_description.json +0 -1
- data/spec/fixtures/tag_delete.json +0 -1
- data/spec/fixtures/tags.json +0 -1
- data/spec/fixtures/team_member.json +0 -1
- data/spec/fixtures/team_members.json +0 -1
- data/spec/fixtures/todo.json +0 -73
- data/spec/fixtures/todos.json +0 -148
- data/spec/fixtures/tree.json +0 -1
- data/spec/fixtures/trigger.json +0 -10
- data/spec/fixtures/triggers.json +0 -12
- data/spec/fixtures/user.json +0 -1
- data/spec/fixtures/user_block_unblock.json +0 -1
- data/spec/fixtures/user_email.json +0 -1
- data/spec/fixtures/user_emails.json +0 -1
- data/spec/fixtures/user_search.json +0 -1
- data/spec/fixtures/users.json +0 -1
- data/spec/fixtures/variable.json +0 -4
- data/spec/fixtures/variables.json +0 -10
- data/spec/gitlab/cli_helpers_spec.rb +0 -57
- data/spec/gitlab/cli_spec.rb +0 -119
- data/spec/gitlab/client/award_emojis_spec.rb +0 -391
- data/spec/gitlab/client/boards_spec.rb +0 -94
- data/spec/gitlab/client/branches_spec.rb +0 -116
- data/spec/gitlab/client/build_variables_spec.rb +0 -86
- data/spec/gitlab/client/builds_spec.rb +0 -148
- data/spec/gitlab/client/client_spec.rb +0 -11
- data/spec/gitlab/client/commits_spec.rb +0 -168
- data/spec/gitlab/client/environments_spec.rb +0 -132
- data/spec/gitlab/client/groups_spec.rb +0 -195
- data/spec/gitlab/client/issues_spec.rb +0 -186
- data/spec/gitlab/client/jobs_spec.rb +0 -135
- data/spec/gitlab/client/keys_spec.rb +0 -19
- data/spec/gitlab/client/labels_spec.rb +0 -100
- data/spec/gitlab/client/merge_requests_spec.rb +0 -224
- data/spec/gitlab/client/milestones_spec.rb +0 -98
- data/spec/gitlab/client/namespaces_spec.rb +0 -22
- data/spec/gitlab/client/notes_spec.rb +0 -333
- data/spec/gitlab/client/pipeline_triggers_spec.rb +0 -157
- data/spec/gitlab/client/pipelines_spec.rb +0 -95
- data/spec/gitlab/client/projects_spec.rb +0 -613
- data/spec/gitlab/client/repositories_spec.rb +0 -94
- data/spec/gitlab/client/repository_files_spec.rb +0 -95
- data/spec/gitlab/client/runners_spec.rb +0 -185
- data/spec/gitlab/client/services_spec.rb +0 -55
- data/spec/gitlab/client/snippets_spec.rb +0 -100
- data/spec/gitlab/client/system_hooks_spec.rb +0 -69
- data/spec/gitlab/client/tags_spec.rb +0 -109
- data/spec/gitlab/client/todos_spec.rb +0 -45
- data/spec/gitlab/client/users_spec.rb +0 -418
- data/spec/gitlab/error_spec.rb +0 -45
- data/spec/gitlab/file_response_spec.rb +0 -33
- data/spec/gitlab/help_spec.rb +0 -46
- data/spec/gitlab/objectified_hash_spec.rb +0 -48
- data/spec/gitlab/page_links_spec.rb +0 -16
- data/spec/gitlab/paginated_response_spec.rb +0 -60
- data/spec/gitlab/request_spec.rb +0 -73
- data/spec/gitlab/shell_history_spec.rb +0 -53
- data/spec/gitlab/shell_spec.rb +0 -80
- data/spec/gitlab_spec.rb +0 -97
- data/spec/spec_helper.rb +0 -74
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
describe Gitlab::Client do
|
|
4
|
-
it { should respond_to :delete_trigger }
|
|
5
|
-
|
|
6
|
-
describe ".triggers" do
|
|
7
|
-
before do
|
|
8
|
-
stub_get("/projects/3/triggers", "triggers")
|
|
9
|
-
@triggers = Gitlab.triggers(3)
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
it "should get the correct resource" do
|
|
13
|
-
expect(a_get("/projects/3/triggers")).to have_been_made
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
it "should return an array of project's triggers" do
|
|
17
|
-
expect(@triggers).to be_a Gitlab::PaginatedResponse
|
|
18
|
-
expect(@triggers.first.token).to eq("6d056f63e50fe6f8c5f8f4aa10edb7")
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
describe ".trigger" do
|
|
23
|
-
before do
|
|
24
|
-
stub_get("/projects/3/triggers/10", "trigger")
|
|
25
|
-
@trigger = Gitlab.trigger(3, 10)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
it "should get the correct resource" do
|
|
29
|
-
expect(a_get("/projects/3/triggers/10")).to have_been_made
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
it "should return information about a trigger" do
|
|
33
|
-
expect(@trigger.created_at).to eq("2016-01-07T09:53:58.235Z")
|
|
34
|
-
expect(@trigger.token).to eq("6d056f63e50fe6f8c5f8f4aa10edb7")
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
describe ".create_trigger" do
|
|
39
|
-
before do
|
|
40
|
-
stub_post("/projects/3/triggers", "trigger")
|
|
41
|
-
@trigger = Gitlab.create_trigger(3, "my description")
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
it "should get the correct resource" do
|
|
45
|
-
expect(a_post("/projects/3/triggers").
|
|
46
|
-
with(body: { description: "my description" })).to have_been_made
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
it "should return information about a new trigger" do
|
|
50
|
-
expect(@trigger.created_at).to eq("2016-01-07T09:53:58.235Z")
|
|
51
|
-
expect(@trigger.token).to eq("6d056f63e50fe6f8c5f8f4aa10edb7")
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
describe ".update_trigger" do
|
|
56
|
-
before do
|
|
57
|
-
stub_put("/projects/3/triggers/1", "trigger")
|
|
58
|
-
@trigger = Gitlab.update_trigger(3, 1, description: "my description")
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
it "should get the correct resource" do
|
|
62
|
-
expect(a_put("/projects/3/triggers/1").
|
|
63
|
-
with(body: { description: "my description" })).to have_been_made
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
it "should return information about the trigger" do
|
|
67
|
-
expect(@trigger.created_at).to eq("2016-01-07T09:53:58.235Z")
|
|
68
|
-
expect(@trigger.token).to eq("6d056f63e50fe6f8c5f8f4aa10edb7")
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
describe ".trigger_take_ownership" do
|
|
73
|
-
before do
|
|
74
|
-
stub_post("/projects/3/triggers/1/take_ownership", "trigger")
|
|
75
|
-
@trigger = Gitlab.trigger_take_ownership(3, 1)
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
it "should get the correct resource" do
|
|
79
|
-
expect(a_post("/projects/3/triggers/1/take_ownership")).to have_been_made
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
it "should return information about the trigger" do
|
|
83
|
-
expect(@trigger.created_at).to eq("2016-01-07T09:53:58.235Z")
|
|
84
|
-
expect(@trigger.token).to eq("6d056f63e50fe6f8c5f8f4aa10edb7")
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
describe ".remove_trigger" do
|
|
89
|
-
before do
|
|
90
|
-
stub_delete("/projects/3/triggers/10", "empty")
|
|
91
|
-
@trigger = Gitlab.remove_trigger(3, 10)
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
it "should get the correct resource" do
|
|
95
|
-
expect(a_delete("/projects/3/triggers/10")).to have_been_made
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
describe ".run_trigger" do
|
|
100
|
-
before do
|
|
101
|
-
stub_request(:post, "#{Gitlab.endpoint}/projects/3/trigger/pipeline").
|
|
102
|
-
to_return(body: load_fixture("run_trigger"), status: 200)
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
context "when private_token is not set" do
|
|
106
|
-
before do
|
|
107
|
-
Gitlab.private_token = nil
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
it "should not raise Error::MissingCredentials" do
|
|
111
|
-
expect { Gitlab.run_trigger(3, "7b9148c158980bbd9bcea92c17522d", "master", {a: 10}) }.to_not raise_error
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
after do
|
|
115
|
-
Gitlab.private_token = 'secret'
|
|
116
|
-
end
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
context "without variables" do
|
|
120
|
-
before do
|
|
121
|
-
@trigger = Gitlab.run_trigger(3, "7b9148c158980bbd9bcea92c17522d", "master")
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
it "should get the correct resource" do
|
|
125
|
-
expect(a_request(:post, "#{Gitlab.endpoint}/projects/3/trigger/pipeline").
|
|
126
|
-
with(body: {
|
|
127
|
-
token: "7b9148c158980bbd9bcea92c17522d",
|
|
128
|
-
ref: "master"
|
|
129
|
-
})).to have_been_made
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
it "should return information about the triggered build" do
|
|
133
|
-
expect(@trigger.id).to eq(8)
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
context "with variables" do
|
|
138
|
-
before do
|
|
139
|
-
@trigger = Gitlab.run_trigger(3, "7b9148c158980bbd9bcea92c17522d", "master", {a: 10})
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
it "should get the correct resource" do
|
|
143
|
-
expect(a_request(:post, "#{Gitlab.endpoint}/projects/3/trigger/pipeline").
|
|
144
|
-
with(body: {
|
|
145
|
-
token: "7b9148c158980bbd9bcea92c17522d",
|
|
146
|
-
ref: "master",
|
|
147
|
-
variables: {a: "10"}
|
|
148
|
-
})).to have_been_made
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
it "should return information about the triggered build" do
|
|
152
|
-
expect(@trigger.id).to eq(8)
|
|
153
|
-
expect(@trigger.variables.a).to eq("10")
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
end
|
|
157
|
-
end
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
describe Gitlab::Client do
|
|
4
|
-
describe ".pipelines" do
|
|
5
|
-
before do
|
|
6
|
-
stub_get("/projects/3/pipelines", "pipelines")
|
|
7
|
-
@pipelines = Gitlab.pipelines(3)
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
it "should get the correct resource" do
|
|
11
|
-
expect(a_get("/projects/3/pipelines")).to have_been_made
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
it "should return a paginated response of project's pipelines" do
|
|
15
|
-
expect(@pipelines).to be_a Gitlab::PaginatedResponse
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
describe ".pipeline" do
|
|
20
|
-
before do
|
|
21
|
-
stub_get("/projects/3/pipelines/46", "pipeline")
|
|
22
|
-
@pipeline = Gitlab.pipeline(3, 46)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
it "should get the correct resource" do
|
|
26
|
-
expect(a_get("/projects/3/pipelines/46")).to have_been_made
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
it "should return a single pipeline" do
|
|
30
|
-
expect(@pipeline).to be_a Gitlab::ObjectifiedHash
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
it "should return information about a pipeline" do
|
|
34
|
-
expect(@pipeline.id).to eq(46)
|
|
35
|
-
expect(@pipeline.user.name).to eq("Administrator")
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
describe ".create_pipeline" do
|
|
40
|
-
before do
|
|
41
|
-
stub_post("/projects/3/pipeline?ref=master", "pipeline_create")
|
|
42
|
-
@pipeline_create = Gitlab.create_pipeline(3, 'master')
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
it "should get the correct resource" do
|
|
46
|
-
expect(a_post("/projects/3/pipeline?ref=master")).to have_been_made
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
it "should return a single pipeline" do
|
|
50
|
-
expect(@pipeline_create).to be_a Gitlab::ObjectifiedHash
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
it "should return information about a pipeline" do
|
|
54
|
-
expect(@pipeline_create.user.name).to eq("Administrator")
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
describe ".cancel_pipeline" do
|
|
59
|
-
before do
|
|
60
|
-
stub_post("/projects/3/pipelines/46/cancel", "pipeline_cancel")
|
|
61
|
-
@pipeline_cancel = Gitlab.cancel_pipeline(3, 46)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
it "should get the correct resource" do
|
|
65
|
-
expect(a_post("/projects/3/pipelines/46/cancel")).to have_been_made
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
it "should return a single pipeline" do
|
|
69
|
-
expect(@pipeline_cancel).to be_a Gitlab::ObjectifiedHash
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
it "should return information about a pipeline" do
|
|
73
|
-
expect(@pipeline_cancel.user.name).to eq("Administrator")
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
describe ".retry_pipeline" do
|
|
78
|
-
before do
|
|
79
|
-
stub_post("/projects/3/pipelines/46/retry", "pipeline_retry")
|
|
80
|
-
@pipeline_retry = Gitlab.retry_pipeline(3, 46)
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
it "should get the correct resource" do
|
|
84
|
-
expect(a_post("/projects/3/pipelines/46/retry")).to have_been_made
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
it "should return a single pipeline" do
|
|
88
|
-
expect(@pipeline_retry).to be_a Gitlab::ObjectifiedHash
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
it "should return information about a pipeline" do
|
|
92
|
-
expect(@pipeline_retry.user.name).to eq("Administrator")
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|