diff options
| author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-01-14 19:45:43 +0100 |
|---|---|---|
| committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-01-14 19:45:55 +0100 |
| commit | ac652d82f17d378e485dcef15a8fabdcf9bad76b (patch) | |
| tree | 722e6afd2ea63a43b15886b890138c3def3d5885 /spec/requests | |
| parent | ba42b03348056e511df8484a8b342c7a2129c4f4 (diff) | |
| download | gitlab-ce-ac652d82f17d378e485dcef15a8fabdcf9bad76b.tar.gz | |
Let the CI runner know about builds that this build depends onci/build_dependencies
This allows us to implement artifacts passing: runner will download artifacts from all prior builds
Diffstat (limited to 'spec/requests')
| -rw-r--r-- | spec/requests/ci/api/builds_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb index 648ea0d5f50..1c3e27abb9f 100644 --- a/spec/requests/ci/api/builds_spec.rb +++ b/spec/requests/ci/api/builds_spec.rb @@ -101,6 +101,18 @@ describe Ci::API::API do { "key" => "TRIGGER_KEY", "value" => "TRIGGER_VALUE", "public" => false }, ]) end + + it "returns dependent builds" do + commit = FactoryGirl.create(:ci_commit, project: project) + commit.create_builds('master', false, nil, nil) + commit.builds.where(stage: 'test').each(&:success) + + post ci_api("/builds/register"), token: runner.token, info: { platform: :darwin } + + expect(response.status).to eq(201) + expect(json_response["dependencies"]["builds"].count).to eq(2) + expect(json_response["dependencies"]["builds"][0]["name"]).to eq("rspec") + end end describe "PUT /builds/:id" do |
