diff --git a/src/api/app/models/staging/staged_requests.rb b/src/api/app/models/staging/staged_requests.rb index bfd5a79cad7..e2b0011fdb6 100644 --- a/src/api/app/models/staging/staged_requests.rb +++ b/src/api/app/models/staging/staged_requests.rb @@ -108,6 +108,11 @@ def requests def link_package(bs_request_action) request = bs_request_action.bs_request + if Package.find_by(project: staging_project, name: bs_request_action.target_package) + errors << "Can't stage request '#{request.number}': package '#{bs_request_action.target_package}' already exists in '#{staging_project}'." + return + end + source_package = Package.get_by_project_and_name!(bs_request_action.source_project, bs_request_action.source_package) @@ -120,7 +125,7 @@ def link_package(bs_request_action) package_rev = backend_package_information['srcmd5'] - link_package = Package.find_or_create_by!(project: staging_project, name: bs_request_action.target_package) + link_package = Package.create!(project: staging_project, name: bs_request_action.target_package) create_link(staging_project.name, link_package.name, User.session!, project: source_package.project.name, package: source_package.name, rev: package_rev, diff --git a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_3.yml b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_1.yml similarity index 78% rename from src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_3.yml rename to src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_1.yml index 64b17a671ed..5131f91cc76 100644 --- a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_3.yml +++ b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_1.yml @@ -1,11 +1,16 @@ --- http_interactions: - request: - method: get - uri: http://backend:5352/source/source_project/source_package?expand=1 + method: put + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user body: - encoding: US-ASCII - string: '' + encoding: UTF-8 + string: | + + + <description/> + <person userid="permitted_user" role="maintainer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -25,21 +30,26 @@ http_interactions: Connection: - close Content-Length: - - '89' + - '150' body: encoding: UTF-8 string: | - <directory name="source_package" srcmd5="d41d8cd98f00b204e9800998ecf8427e"> - </directory> + <project name="home:permitted_user"> + <title> + + + http_version: - recorded_at: Thu, 07 Nov 2019 08:41:15 GMT + recorded_at: Mon, 18 Nov 2019 15:26:12 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user body: encoding: UTF-8 - string: + string: | + + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,26 +69,30 @@ http_interactions: Connection: - close Content-Length: - - '214' + - '178' body: encoding: UTF-8 string: | - - 79a98c689441a75bd9731a609257afc6 - unknown - + + 5aa91688e74e53b49343157a65da71e6 + permitted_user http_version: - recorded_at: Thu, 07 Nov 2019 08:41:15 GMT + recorded_at: Mon, 18 Nov 2019 15:26:12 GMT - request: - method: get - uri: http://backend:5352/source/source_project/source_package?expand=1 + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user body: - encoding: US-ASCII - string: '' + encoding: UTF-8 + string: | + + + <description/> + <group groupid="staging-workflow-managers-2" role="maintainer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,21 +112,27 @@ http_interactions: Connection: - close Content-Length: - - '89' + - '173' body: encoding: UTF-8 string: | - <directory name="source_package" srcmd5="d41d8cd98f00b204e9800998ecf8427e"> - </directory> + <project name="home:permitted_user:Staging:A"> + <title> + + + http_version: - recorded_at: Thu, 07 Nov 2019 08:41:15 GMT + recorded_at: Mon, 18 Nov 2019 15:26:12 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user body: encoding: UTF-8 - string: + string: | + + + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -132,30 +152,29 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '178' body: encoding: UTF-8 string: | - - 79a98c689441a75bd9731a609257afc6 - unknown - + + 6b66a2ec580136385a4db14d7d083dd7 + permitted_user http_version: - recorded_at: Thu, 07 Nov 2019 08:41:16 GMT + recorded_at: Mon, 18 Nov 2019 15:26:12 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user body: encoding: UTF-8 string: | - + <description/> - <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-2" role="maintainer"/> </project> headers: Accept-Encoding: @@ -176,26 +195,29 @@ http_interactions: Connection: - close Content-Length: - - '150' + - '173' body: encoding: UTF-8 string: | - <project name="home:permitted_user"> + <project name="home:permitted_user:Staging:B"> <title> - + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:28 GMT + recorded_at: Mon, 18 Nov 2019 15:26:12 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - + + + <description/> + <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-2" role="reviewer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -215,30 +237,28 @@ http_interactions: Connection: - close Content-Length: - - '178' + - '215' body: encoding: UTF-8 string: | - <revision rev="293"> - <srcmd5>ce4c2119d1ab95fe5f2847a789f537fc</srcmd5> - <time>1573220788</time> - <user>permitted_user</user> - <comment></comment> - <requestid/> - </revision> + <project name="home:permitted_user"> + <title> + + + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:28 GMT + recorded_at: Mon, 18 Nov 2019 15:26:12 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - <description/> - <group groupid="staging-workflow-managers-46" role="maintainer"/> - </project> + <package name="target_package" project="home:permitted_user"> + <title>Fame Is the Spur + Nihil omnis enim sequi. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -258,27 +278,26 @@ http_interactions: Connection: - close Content-Length: - - '174' + - '160' body: encoding: UTF-8 string: | - - - - - + + Fame Is the Spur + Nihil omnis enim sequi. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:29 GMT + recorded_at: Mon, 18 Nov 2019 15:26:13 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + uri: http://backend:5352/source/source_project/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - - + + The Golden Bowl + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -298,30 +317,26 @@ http_interactions: Connection: - close Content-Length: - - '178' + - '106' body: encoding: UTF-8 string: | - - 43f1105e4d7fc176c0b98f1563dd32ba - - permitted_user - - - + + The Golden Bowl + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:29 GMT + recorded_at: Mon, 18 Nov 2019 15:26:13 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user + uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - <description/> - <group groupid="staging-workflow-managers-46" role="maintainer"/> - </project> + <package name="source_package" project="source_project"> + <title>Noli Me Tangere + Odit ex vel ut. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -341,29 +356,26 @@ http_interactions: Connection: - close Content-Length: - - '174' + - '146' body: encoding: UTF-8 string: | - - - - - + + Noli Me Tangere + Odit ex vel ut. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:29 GMT + recorded_at: Mon, 18 Nov 2019 15:26:13 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/another_target_package/_meta?user=unpermitted_user body: encoding: UTF-8 string: | - - - <description/> - <person userid="permitted_user" role="maintainer"/> - <group groupid="staging-workflow-managers-46" role="reviewer"/> - </project> + <package name="another_target_package" project="home:permitted_user"> + <title>That Good Night + Vitae voluptas aut repellendus. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -383,28 +395,22 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '175' body: encoding: UTF-8 string: | - - - - - - + + That Good Night + Vitae voluptas aut repellendus. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:30 GMT + recorded_at: Mon, 18 Nov 2019 15:26:14 GMT - request: - method: put - uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 body: - encoding: UTF-8 - string: | - - The Millstone - Adipisci delectus deserunt aperiam. - + encoding: US-ASCII + string: '' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -424,26 +430,24 @@ http_interactions: Connection: - close Content-Length: - - '169' + - '89' body: encoding: UTF-8 string: | - - The Millstone - Adipisci delectus deserunt aperiam. - + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:30 GMT + recorded_at: Mon, 18 Nov 2019 15:26:14 GMT - request: method: put - uri: http://backend:5352/source/source_project/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - The Monkey's Raincoat + + <description/> - </project> + </package> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -463,26 +467,23 @@ http_interactions: Connection: - close Content-Length: - - '112' + - '131' body: encoding: UTF-8 string: | - <project name="source_project"> - <title>The Monkey's Raincoat + + - + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:30 GMT + recorded_at: Mon, 18 Nov 2019 15:26:15 GMT - request: method: put - uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user body: encoding: UTF-8 - string: | - - The Wealth of Nations - Ullam corrupti qui quam. - + string: headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -502,26 +503,26 @@ http_interactions: Connection: - close Content-Length: - - '161' + - '216' body: encoding: UTF-8 string: | - - The Wealth of Nations - Ullam corrupti qui quam. - + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:30 GMT + recorded_at: Mon, 18 Nov 2019 15:26:15 GMT - request: - method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 body: - encoding: UTF-8 - string: | - - - <description/> - </package> + encoding: US-ASCII + string: '' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -541,25 +542,25 @@ http_interactions: Connection: - close Content-Length: - - '131' + - '89' body: encoding: UTF-8 string: | - <package name="target_package" project="home:permitted_user:Staging:A"> - <title> - - + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:31 GMT + recorded_at: Mon, 18 Nov 2019 15:26:15 GMT - request: - method: post - uri: http://backend:5352/search/package/id?match=(linkinfo/@package=%22target_package%22%20and%20linkinfo/@project=%22home:permitted_user%22%20and%20@project=%22home:permitted_user%22) + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/another_target_package/_meta?user=permitted_user body: encoding: UTF-8 - string: '' + string: | + + + <description/> + </package> headers: - Content-Type: - - application/octet-stream Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -578,23 +579,24 @@ http_interactions: Connection: - close Content-Length: - - '27' + - '139' body: encoding: UTF-8 string: | - <collection> - </collection> + <package name="another_target_package" project="home:permitted_user:Staging:A"> + <title> + + http_version: - recorded_at: Mon, 11 Nov 2019 09:42:20 GMT + recorded_at: Mon, 18 Nov 2019 15:26:15 GMT - request: - method: post - uri: http://backend:5352/search/package/id?match=(linkinfo/@package=%22target_package%22%20and%20linkinfo/@project=%22home:permitted_user%22%20and%20@project=%22home:permitted_user%22) + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/another_target_package/_link?user=permitted_user body: encoding: UTF-8 - string: '' + string: headers: - Content-Type: - - application/octet-stream Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -613,12 +615,18 @@ http_interactions: Connection: - close Content-Length: - - '27' + - '214' body: encoding: UTF-8 string: | - - + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + http_version: - recorded_at: Mon, 11 Nov 2019 09:42:20 GMT + recorded_at: Mon, 18 Nov 2019 15:26:15 GMT recorded_with: VCR 5.0.0 diff --git a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_1.yml b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_2.yml similarity index 78% rename from src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_1.yml rename to src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_2.yml index bc8ace04378..f9894e49e0a 100644 --- a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_1.yml +++ b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_2.yml @@ -1,11 +1,16 @@ --- http_interactions: - request: - method: get - uri: http://backend:5352/source/source_project/source_package?expand=1 + method: put + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user body: - encoding: US-ASCII - string: '' + encoding: UTF-8 + string: | + + + <description/> + <person userid="permitted_user" role="maintainer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -25,21 +30,26 @@ http_interactions: Connection: - close Content-Length: - - '89' + - '150' body: encoding: UTF-8 string: | - <directory name="source_package" srcmd5="d41d8cd98f00b204e9800998ecf8427e"> - </directory> + <project name="home:permitted_user"> + <title> + + + http_version: - recorded_at: Thu, 07 Nov 2019 08:41:20 GMT + recorded_at: Mon, 18 Nov 2019 15:26:06 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user body: encoding: UTF-8 - string: + string: | + + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,26 +69,30 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '178' body: encoding: UTF-8 string: | - - 79a98c689441a75bd9731a609257afc6 - unknown - + + 9dcb5cf420daed4d036a384bfeb64efb + permitted_user http_version: - recorded_at: Thu, 07 Nov 2019 08:41:21 GMT + recorded_at: Mon, 18 Nov 2019 15:26:06 GMT - request: - method: get - uri: http://backend:5352/source/source_project/source_package?expand=1 + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user body: - encoding: US-ASCII - string: '' + encoding: UTF-8 + string: | + + + <description/> + <group groupid="staging-workflow-managers-1" role="maintainer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,21 +112,27 @@ http_interactions: Connection: - close Content-Length: - - '89' + - '173' body: encoding: UTF-8 string: | - <directory name="source_package" srcmd5="d41d8cd98f00b204e9800998ecf8427e"> - </directory> + <project name="home:permitted_user:Staging:A"> + <title> + + + http_version: - recorded_at: Thu, 07 Nov 2019 08:41:21 GMT + recorded_at: Mon, 18 Nov 2019 15:26:06 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user body: encoding: UTF-8 - string: + string: | + + + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -132,30 +152,29 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '178' body: encoding: UTF-8 string: | - - 79a98c689441a75bd9731a609257afc6 - unknown - + + 55c0e52fdb04d9dffcf1ab79dc2ec54c + permitted_user http_version: - recorded_at: Thu, 07 Nov 2019 08:41:21 GMT + recorded_at: Mon, 18 Nov 2019 15:26:07 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user body: encoding: UTF-8 string: | - + <description/> - <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-1" role="maintainer"/> </project> headers: Accept-Encoding: @@ -176,26 +195,29 @@ http_interactions: Connection: - close Content-Length: - - '150' + - '173' body: encoding: UTF-8 string: | - <project name="home:permitted_user"> + <project name="home:permitted_user:Staging:B"> <title> - + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:19 GMT + recorded_at: Mon, 18 Nov 2019 15:26:07 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - + + + <description/> + <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-1" role="reviewer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -215,30 +237,28 @@ http_interactions: Connection: - close Content-Length: - - '178' + - '215' body: encoding: UTF-8 string: | - <revision rev="289"> - <srcmd5>a01647d6f5859c83d2753fe5e4298c4c</srcmd5> - <time>1573220779</time> - <user>permitted_user</user> - <comment></comment> - <requestid/> - </revision> + <project name="home:permitted_user"> + <title> + + + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:19 GMT + recorded_at: Mon, 18 Nov 2019 15:26:07 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - <description/> - <group groupid="staging-workflow-managers-44" role="maintainer"/> - </project> + <package name="target_package" project="home:permitted_user"> + <title>Jesting Pilate + Quisquam omnis nobis numquam. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -258,27 +278,26 @@ http_interactions: Connection: - close Content-Length: - - '174' + - '164' body: encoding: UTF-8 string: | - - - - - + + Jesting Pilate + Quisquam omnis nobis numquam. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:19 GMT + recorded_at: Mon, 18 Nov 2019 15:26:07 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + uri: http://backend:5352/source/source_project/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - - + + Paths of Glory + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -298,30 +317,26 @@ http_interactions: Connection: - close Content-Length: - - '178' + - '105' body: encoding: UTF-8 string: | - - 98a903ecb19cf48d8cf3f45464236b2a - - permitted_user - - - + + Paths of Glory + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:20 GMT + recorded_at: Mon, 18 Nov 2019 15:26:07 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user + uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - <description/> - <group groupid="staging-workflow-managers-44" role="maintainer"/> - </project> + <package name="source_package" project="source_project"> + <title>An Instant In The Wind + Ratione nemo sunt id. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -341,29 +356,26 @@ http_interactions: Connection: - close Content-Length: - - '174' + - '159' body: encoding: UTF-8 string: | - - - - - + + An Instant In The Wind + Ratione nemo sunt id. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:20 GMT + recorded_at: Mon, 18 Nov 2019 15:26:07 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/another_target_package/_meta?user=unpermitted_user body: encoding: UTF-8 string: | - - - <description/> - <person userid="permitted_user" role="maintainer"/> - <group groupid="staging-workflow-managers-44" role="reviewer"/> - </project> + <package name="another_target_package" project="home:permitted_user"> + <title>In Dubious Battle + Vero repellendus fugiat tenetur. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -383,28 +395,22 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '178' body: encoding: UTF-8 string: | - - - - - - + + In Dubious Battle + Vero repellendus fugiat tenetur. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:20 GMT + recorded_at: Mon, 18 Nov 2019 15:26:08 GMT - request: - method: put - uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 body: - encoding: UTF-8 - string: | - - Now Sleeps the Crimson Petal - Sequi voluptatem veritatis officiis. - + encoding: US-ASCII + string: '' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -424,26 +430,24 @@ http_interactions: Connection: - close Content-Length: - - '185' + - '89' body: encoding: UTF-8 string: | - - Now Sleeps the Crimson Petal - Sequi voluptatem veritatis officiis. - + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:21 GMT + recorded_at: Mon, 18 Nov 2019 15:26:09 GMT - request: method: put - uri: http://backend:5352/source/source_project/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - Oh! To be in England + + <description/> - </project> + </package> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -463,26 +467,23 @@ http_interactions: Connection: - close Content-Length: - - '111' + - '131' body: encoding: UTF-8 string: | - <project name="source_project"> - <title>Oh! To be in England + + - + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:21 GMT + recorded_at: Mon, 18 Nov 2019 15:26:09 GMT - request: method: put - uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user body: encoding: UTF-8 - string: | - - The Line of Beauty - Quis unde perferendis minus. - + string: headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -502,26 +503,26 @@ http_interactions: Connection: - close Content-Length: - - '162' + - '216' body: encoding: UTF-8 string: | - - The Line of Beauty - Quis unde perferendis minus. - + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:21 GMT + recorded_at: Mon, 18 Nov 2019 15:26:09 GMT - request: - method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 body: - encoding: UTF-8 - string: | - - - <description/> - </package> + encoding: US-ASCII + string: '' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -541,25 +542,25 @@ http_interactions: Connection: - close Content-Length: - - '131' + - '89' body: encoding: UTF-8 string: | - <package name="target_package" project="home:permitted_user:Staging:A"> - <title> - - + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:21 GMT + recorded_at: Mon, 18 Nov 2019 15:26:10 GMT - request: - method: post - uri: http://backend:5352/search/package/id?match=(linkinfo/@package=%22target_package%22%20and%20linkinfo/@project=%22home:permitted_user%22%20and%20@project=%22home:permitted_user%22) + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/another_target_package/_meta?user=permitted_user body: encoding: UTF-8 - string: '' + string: | + + + <description/> + </package> headers: - Content-Type: - - application/octet-stream Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -578,23 +579,24 @@ http_interactions: Connection: - close Content-Length: - - '27' + - '139' body: encoding: UTF-8 string: | - <collection> - </collection> + <package name="another_target_package" project="home:permitted_user:Staging:A"> + <title> + + http_version: - recorded_at: Mon, 11 Nov 2019 09:42:23 GMT + recorded_at: Mon, 18 Nov 2019 15:26:10 GMT - request: - method: post - uri: http://backend:5352/search/package/id?match=(linkinfo/@package=%22target_package%22%20and%20linkinfo/@project=%22home:permitted_user%22%20and%20@project=%22home:permitted_user%22) + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/another_target_package/_link?user=permitted_user body: encoding: UTF-8 - string: '' + string: headers: - Content-Type: - - application/octet-stream Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -613,12 +615,18 @@ http_interactions: Connection: - close Content-Length: - - '27' + - '214' body: encoding: UTF-8 string: | - - + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + http_version: - recorded_at: Mon, 11 Nov 2019 09:42:23 GMT + recorded_at: Mon, 18 Nov 2019 15:26:10 GMT recorded_with: VCR 5.0.0 diff --git a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_2.yml b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_3.yml similarity index 78% rename from src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_2.yml rename to src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_3.yml index 7a5a5426fbc..e3cf0d6a022 100644 --- a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_2.yml +++ b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_3.yml @@ -1,11 +1,16 @@ --- http_interactions: - request: - method: get - uri: http://backend:5352/source/source_project/source_package?expand=1 + method: put + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user body: - encoding: US-ASCII - string: '' + encoding: UTF-8 + string: | + + + <description/> + <person userid="permitted_user" role="maintainer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -25,21 +30,26 @@ http_interactions: Connection: - close Content-Length: - - '89' + - '150' body: encoding: UTF-8 string: | - <directory name="source_package" srcmd5="d41d8cd98f00b204e9800998ecf8427e"> - </directory> + <project name="home:permitted_user"> + <title> + + + http_version: - recorded_at: Thu, 07 Nov 2019 08:41:23 GMT + recorded_at: Mon, 18 Nov 2019 15:26:21 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user body: encoding: UTF-8 - string: + string: | + + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,26 +69,30 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '178' body: encoding: UTF-8 string: | - - 79a98c689441a75bd9731a609257afc6 - unknown - + + 18c157519aff432594c6a090a274aba7 + permitted_user http_version: - recorded_at: Thu, 07 Nov 2019 08:41:24 GMT + recorded_at: Mon, 18 Nov 2019 15:26:21 GMT - request: - method: get - uri: http://backend:5352/source/source_project/source_package?expand=1 + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user body: - encoding: US-ASCII - string: '' + encoding: UTF-8 + string: | + + + <description/> + <group groupid="staging-workflow-managers-4" role="maintainer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,21 +112,27 @@ http_interactions: Connection: - close Content-Length: - - '89' + - '173' body: encoding: UTF-8 string: | - <directory name="source_package" srcmd5="d41d8cd98f00b204e9800998ecf8427e"> - </directory> + <project name="home:permitted_user:Staging:A"> + <title> + + + http_version: - recorded_at: Thu, 07 Nov 2019 08:41:25 GMT + recorded_at: Mon, 18 Nov 2019 15:26:21 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user body: encoding: UTF-8 - string: + string: | + + + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -132,30 +152,29 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '178' body: encoding: UTF-8 string: | - - 79a98c689441a75bd9731a609257afc6 - unknown - + + ad46b5f3713410d48ff8bd3925f28689 + permitted_user http_version: - recorded_at: Thu, 07 Nov 2019 08:41:26 GMT + recorded_at: Mon, 18 Nov 2019 15:26:21 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user body: encoding: UTF-8 string: | - + <description/> - <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-4" role="maintainer"/> </project> headers: Accept-Encoding: @@ -176,26 +195,29 @@ http_interactions: Connection: - close Content-Length: - - '150' + - '173' body: encoding: UTF-8 string: | - <project name="home:permitted_user"> + <project name="home:permitted_user:Staging:B"> <title> - + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:16 GMT + recorded_at: Mon, 18 Nov 2019 15:26:21 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - + + + <description/> + <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-4" role="reviewer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -215,30 +237,28 @@ http_interactions: Connection: - close Content-Length: - - '178' + - '215' body: encoding: UTF-8 string: | - <revision rev="287"> - <srcmd5>aab62be643ee0d52c9cdd2d8fe491416</srcmd5> - <time>1573220776</time> - <user>permitted_user</user> - <comment></comment> - <requestid/> - </revision> + <project name="home:permitted_user"> + <title> + + + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:16 GMT + recorded_at: Mon, 18 Nov 2019 15:26:22 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - <description/> - <group groupid="staging-workflow-managers-43" role="maintainer"/> - </project> + <package name="target_package" project="home:permitted_user"> + <title>The Cricket on the Hearth + Ab quidem veritatis minima. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -258,27 +278,26 @@ http_interactions: Connection: - close Content-Length: - - '174' + - '173' body: encoding: UTF-8 string: | - - - - - + + The Cricket on the Hearth + Ab quidem veritatis minima. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:16 GMT + recorded_at: Mon, 18 Nov 2019 15:26:22 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + uri: http://backend:5352/source/source_project/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - - + + Things Fall Apart + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -298,30 +317,26 @@ http_interactions: Connection: - close Content-Length: - - '178' + - '108' body: encoding: UTF-8 string: | - - 63c767dd372dea9a5251f37ee708c1c5 - - permitted_user - - - + + Things Fall Apart + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:17 GMT + recorded_at: Mon, 18 Nov 2019 15:26:22 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user + uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - <description/> - <group groupid="staging-workflow-managers-43" role="maintainer"/> - </project> + <package name="source_package" project="source_project"> + <title>The Yellow Meads of Asphodel + Aut omnis eaque odio. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -341,29 +356,26 @@ http_interactions: Connection: - close Content-Length: - - '174' + - '165' body: encoding: UTF-8 string: | - - - - - + + The Yellow Meads of Asphodel + Aut omnis eaque odio. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:17 GMT + recorded_at: Mon, 18 Nov 2019 15:26:22 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/another_target_package/_meta?user=unpermitted_user body: encoding: UTF-8 string: | - - - <description/> - <person userid="permitted_user" role="maintainer"/> - <group groupid="staging-workflow-managers-43" role="reviewer"/> - </project> + <package name="another_target_package" project="home:permitted_user"> + <title>Carrion Comfort + Non optio error laudantium. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -383,28 +395,22 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '171' body: encoding: UTF-8 string: | - - - - - - + + Carrion Comfort + Non optio error laudantium. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:17 GMT + recorded_at: Mon, 18 Nov 2019 15:26:23 GMT - request: - method: put - uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 body: - encoding: UTF-8 - string: | - - The Wind's Twelve Quarters - Ab consequatur omnis ut. - + encoding: US-ASCII + string: '' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -424,26 +430,24 @@ http_interactions: Connection: - close Content-Length: - - '171' + - '89' body: encoding: UTF-8 string: | - - The Wind's Twelve Quarters - Ab consequatur omnis ut. - + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:17 GMT + recorded_at: Mon, 18 Nov 2019 15:26:23 GMT - request: method: put - uri: http://backend:5352/source/source_project/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - The Sun Also Rises + + <description/> - </project> + </package> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -463,26 +467,23 @@ http_interactions: Connection: - close Content-Length: - - '109' + - '131' body: encoding: UTF-8 string: | - <project name="source_project"> - <title>The Sun Also Rises + + - + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:17 GMT + recorded_at: Mon, 18 Nov 2019 15:26:24 GMT - request: method: put - uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user body: encoding: UTF-8 - string: | - - Mother Night - Natus officiis officia veniam. - + string: headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -502,26 +503,26 @@ http_interactions: Connection: - close Content-Length: - - '158' + - '216' body: encoding: UTF-8 string: | - - Mother Night - Natus officiis officia veniam. - + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:17 GMT + recorded_at: Mon, 18 Nov 2019 15:26:24 GMT - request: - method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 body: - encoding: UTF-8 - string: | - - - <description/> - </package> + encoding: US-ASCII + string: '' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -541,25 +542,25 @@ http_interactions: Connection: - close Content-Length: - - '131' + - '89' body: encoding: UTF-8 string: | - <package name="target_package" project="home:permitted_user:Staging:A"> - <title> - - + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:18 GMT + recorded_at: Mon, 18 Nov 2019 15:26:24 GMT - request: - method: post - uri: http://backend:5352/search/package/id?match=(linkinfo/@package=%22target_package%22%20and%20linkinfo/@project=%22home:permitted_user%22%20and%20@project=%22home:permitted_user%22) + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/another_target_package/_meta?user=permitted_user body: encoding: UTF-8 - string: '' + string: | + + + <description/> + </package> headers: - Content-Type: - - application/octet-stream Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -578,23 +579,24 @@ http_interactions: Connection: - close Content-Length: - - '27' + - '139' body: encoding: UTF-8 string: | - <collection> - </collection> + <package name="another_target_package" project="home:permitted_user:Staging:A"> + <title> + + http_version: - recorded_at: Mon, 11 Nov 2019 09:42:17 GMT + recorded_at: Mon, 18 Nov 2019 15:26:24 GMT - request: - method: post - uri: http://backend:5352/search/package/id?match=(linkinfo/@package=%22target_package%22%20and%20linkinfo/@project=%22home:permitted_user%22%20and%20@project=%22home:permitted_user%22) + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/another_target_package/_link?user=permitted_user body: encoding: UTF-8 - string: '' + string: headers: - Content-Type: - - application/octet-stream Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -613,12 +615,18 @@ http_interactions: Connection: - close Content-Length: - - '27' + - '214' body: encoding: UTF-8 string: | - - + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + http_version: - recorded_at: Mon, 11 Nov 2019 09:42:18 GMT + recorded_at: Mon, 18 Nov 2019 15:26:24 GMT recorded_with: VCR 5.0.0 diff --git a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_4.yml b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_4.yml similarity index 78% rename from src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_4.yml rename to src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_4.yml index 3af4fb6b688..822495daab3 100644 --- a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/1_2_8_1_4.yml +++ b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_another_package/1_2_8_1_2_4.yml @@ -1,11 +1,16 @@ --- http_interactions: - request: - method: get - uri: http://backend:5352/source/source_project/source_package?expand=1 + method: put + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user body: - encoding: US-ASCII - string: '' + encoding: UTF-8 + string: | + + + <description/> + <person userid="permitted_user" role="maintainer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -25,21 +30,26 @@ http_interactions: Connection: - close Content-Length: - - '89' + - '150' body: encoding: UTF-8 string: | - <directory name="source_package" srcmd5="d41d8cd98f00b204e9800998ecf8427e"> - </directory> + <project name="home:permitted_user"> + <title> + + + http_version: - recorded_at: Thu, 07 Nov 2019 08:41:34 GMT + recorded_at: Mon, 18 Nov 2019 15:26:16 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user body: encoding: UTF-8 - string: + string: | + + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -59,26 +69,30 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '178' body: encoding: UTF-8 string: | - - 79a98c689441a75bd9731a609257afc6 - unknown - + + 602e8e3284f67812365e97e2880b3ef9 + permitted_user http_version: - recorded_at: Thu, 07 Nov 2019 08:41:34 GMT + recorded_at: Mon, 18 Nov 2019 15:26:17 GMT - request: - method: get - uri: http://backend:5352/source/source_project/source_package?expand=1 + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user body: - encoding: US-ASCII - string: '' + encoding: UTF-8 + string: | + + + <description/> + <group groupid="staging-workflow-managers-3" role="maintainer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -98,21 +112,27 @@ http_interactions: Connection: - close Content-Length: - - '89' + - '173' body: encoding: UTF-8 string: | - <directory name="source_package" srcmd5="d41d8cd98f00b204e9800998ecf8427e"> - </directory> + <project name="home:permitted_user:Staging:A"> + <title> + + + http_version: - recorded_at: Thu, 07 Nov 2019 08:41:34 GMT + recorded_at: Mon, 18 Nov 2019 15:26:17 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user body: encoding: UTF-8 - string: + string: | + + + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -132,30 +152,29 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '178' body: encoding: UTF-8 string: | - - 79a98c689441a75bd9731a609257afc6 - unknown - + + 2b5b5658007e8ef89a0cbc4576bcef05 + permitted_user http_version: - recorded_at: Thu, 07 Nov 2019 08:41:35 GMT + recorded_at: Mon, 18 Nov 2019 15:26:17 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user body: encoding: UTF-8 string: | - + <description/> - <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-3" role="maintainer"/> </project> headers: Accept-Encoding: @@ -176,26 +195,29 @@ http_interactions: Connection: - close Content-Length: - - '150' + - '173' body: encoding: UTF-8 string: | - <project name="home:permitted_user"> + <project name="home:permitted_user:Staging:B"> <title> - + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:24 GMT + recorded_at: Mon, 18 Nov 2019 15:26:17 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - + + + <description/> + <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-3" role="reviewer"/> + </project> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -215,30 +237,28 @@ http_interactions: Connection: - close Content-Length: - - '178' + - '215' body: encoding: UTF-8 string: | - <revision rev="291"> - <srcmd5>ab59c9e7fe40c6a6faab7db4e933ecc1</srcmd5> - <time>1573220784</time> - <user>permitted_user</user> - <comment></comment> - <requestid/> - </revision> + <project name="home:permitted_user"> + <title> + + + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:25 GMT + recorded_at: Mon, 18 Nov 2019 15:26:17 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - <description/> - <group groupid="staging-workflow-managers-45" role="maintainer"/> - </project> + <package name="target_package" project="home:permitted_user"> + <title>Ego Dominus Tuus + Nihil ipsam id vel. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -258,27 +278,26 @@ http_interactions: Connection: - close Content-Length: - - '174' + - '156' body: encoding: UTF-8 string: | - - - - - + + Ego Dominus Tuus + Nihil ipsam id vel. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:25 GMT + recorded_at: Mon, 18 Nov 2019 15:26:17 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + uri: http://backend:5352/source/source_project/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - - + + The Mirror Crack'd from Side to Side + + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -298,30 +317,26 @@ http_interactions: Connection: - close Content-Length: - - '178' + - '127' body: encoding: UTF-8 string: | - - ddae74ef57efd5e435222e72ead3c25c - - permitted_user - - - + + The Mirror Crack'd from Side to Side + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:26 GMT + recorded_at: Mon, 18 Nov 2019 15:26:17 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user + uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - - <description/> - <group groupid="staging-workflow-managers-45" role="maintainer"/> - </project> + <package name="source_package" project="source_project"> + <title>The Grapes of Wrath + Pariatur ipsum id earum. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -341,29 +356,26 @@ http_interactions: Connection: - close Content-Length: - - '174' + - '159' body: encoding: UTF-8 string: | - - - - - + + The Grapes of Wrath + Pariatur ipsum id earum. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:26 GMT + recorded_at: Mon, 18 Nov 2019 15:26:17 GMT - request: method: put - uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user/another_target_package/_meta?user=unpermitted_user body: encoding: UTF-8 string: | - - - <description/> - <person userid="permitted_user" role="maintainer"/> - <group groupid="staging-workflow-managers-45" role="reviewer"/> - </project> + <package name="another_target_package" project="home:permitted_user"> + <title>From Here to Eternity + Quisquam non sint iusto. + headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -383,28 +395,22 @@ http_interactions: Connection: - close Content-Length: - - '216' + - '174' body: encoding: UTF-8 string: | - - - - - - + + From Here to Eternity + Quisquam non sint iusto. + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:26 GMT + recorded_at: Mon, 18 Nov 2019 15:26:18 GMT - request: - method: put - uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 body: - encoding: UTF-8 - string: | - - No Highway - Consequuntur amet maiores voluptatem. - + encoding: US-ASCII + string: '' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -424,26 +430,24 @@ http_interactions: Connection: - close Content-Length: - - '168' + - '89' body: encoding: UTF-8 string: | - - No Highway - Consequuntur amet maiores voluptatem. - + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:26 GMT + recorded_at: Mon, 18 Nov 2019 15:26:19 GMT - request: method: put - uri: http://backend:5352/source/source_project/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user body: encoding: UTF-8 string: | - - What's Become of Waring + + <description/> - </project> + </package> headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -463,26 +467,23 @@ http_interactions: Connection: - close Content-Length: - - '114' + - '131' body: encoding: UTF-8 string: | - <project name="source_project"> - <title>What's Become of Waring + + - + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:26 GMT + recorded_at: Mon, 18 Nov 2019 15:26:19 GMT - request: method: put - uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user body: encoding: UTF-8 - string: | - - Jacob Have I Loved - Et molestiae amet est. - + string: headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -502,26 +503,26 @@ http_interactions: Connection: - close Content-Length: - - '156' + - '216' body: encoding: UTF-8 string: | - - Jacob Have I Loved - Et molestiae amet est. - + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:26 GMT + recorded_at: Mon, 18 Nov 2019 15:26:19 GMT - request: - method: put - uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 body: - encoding: UTF-8 - string: | - - - <description/> - </package> + encoding: US-ASCII + string: '' headers: Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 @@ -541,25 +542,25 @@ http_interactions: Connection: - close Content-Length: - - '131' + - '89' body: encoding: UTF-8 string: | - <package name="target_package" project="home:permitted_user:Staging:A"> - <title> - - + + http_version: - recorded_at: Fri, 08 Nov 2019 13:46:27 GMT + recorded_at: Mon, 18 Nov 2019 15:26:19 GMT - request: - method: post - uri: http://backend:5352/search/package/id?match=(linkinfo/@package=%22target_package%22%20and%20linkinfo/@project=%22home:permitted_user%22%20and%20@project=%22home:permitted_user%22) + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/another_target_package/_meta?user=permitted_user body: encoding: UTF-8 - string: '' + string: | + + + <description/> + </package> headers: - Content-Type: - - application/octet-stream Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -578,23 +579,24 @@ http_interactions: Connection: - close Content-Length: - - '27' + - '139' body: encoding: UTF-8 string: | - <collection> - </collection> + <package name="another_target_package" project="home:permitted_user:Staging:A"> + <title> + + http_version: - recorded_at: Mon, 11 Nov 2019 09:42:16 GMT + recorded_at: Mon, 18 Nov 2019 15:26:19 GMT - request: - method: post - uri: http://backend:5352/search/package/id?match=(linkinfo/@package=%22target_package%22%20and%20linkinfo/@project=%22home:permitted_user%22%20and%20@project=%22home:permitted_user%22) + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/another_target_package/_link?user=permitted_user body: encoding: UTF-8 - string: '' + string: headers: - Content-Type: - - application/octet-stream Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: @@ -613,12 +615,18 @@ http_interactions: Connection: - close Content-Length: - - '27' + - '214' body: encoding: UTF-8 string: | - - + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + http_version: - recorded_at: Mon, 11 Nov 2019 09:42:16 GMT + recorded_at: Mon, 18 Nov 2019 15:26:19 GMT recorded_with: VCR 5.0.0 diff --git a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_the_same_package/1_2_8_1_1_1.yml b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_the_same_package/1_2_8_1_1_1.yml new file mode 100644 index 00000000000..cc274b2065e --- /dev/null +++ b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_the_same_package/1_2_8_1_1_1.yml @@ -0,0 +1,481 @@ +--- +http_interactions: +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + <person userid="permitted_user" role="maintainer"/> + </project> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '150' + body: + encoding: UTF-8 + string: | + <project name="home:permitted_user"> + <title> + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:29 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + body: + encoding: UTF-8 + string: | + + + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '178' + body: + encoding: UTF-8 + string: | + + bbd8a431d5c59192abf355e56297dd4a + + permitted_user + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:29 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + <group groupid="staging-workflow-managers-6" role="maintainer"/> + </project> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '173' + body: + encoding: UTF-8 + string: | + <project name="home:permitted_user:Staging:A"> + <title> + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:29 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + body: + encoding: UTF-8 + string: | + + + + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '178' + body: + encoding: UTF-8 + string: | + + 0651003a3743701befa723c0e0a7c774 + + permitted_user + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:29 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + <group groupid="staging-workflow-managers-6" role="maintainer"/> + </project> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '173' + body: + encoding: UTF-8 + string: | + <project name="home:permitted_user:Staging:B"> + <title> + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:29 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-6" role="reviewer"/> + </project> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '215' + body: + encoding: UTF-8 + string: | + <project name="home:permitted_user"> + <title> + + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:30 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + Oh! To be in England + Id amet molestias delectus. + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '168' + body: + encoding: UTF-8 + string: | + + Oh! To be in England + Id amet molestias delectus. + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:30 GMT +- request: + method: put + uri: http://backend:5352/source/source_project/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + Far From the Madding Crowd + + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '117' + body: + encoding: UTF-8 + string: | + + Far From the Madding Crowd + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:30 GMT +- request: + method: put + uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + Many Waters + Quas iure sunt temporibus. + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '153' + body: + encoding: UTF-8 + string: | + + Many Waters + Quas iure sunt temporibus. + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:30 GMT +- request: + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '89' + body: + encoding: UTF-8 + string: | + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:31 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + </package> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '131' + body: + encoding: UTF-8 + string: | + <package name="target_package" project="home:permitted_user:Staging:A"> + <title> + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:32 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + body: + encoding: UTF-8 + string: + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '216' + body: + encoding: UTF-8 + string: | + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:32 GMT +recorded_with: VCR 5.0.0 diff --git a/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_the_same_package/1_2_8_1_1_2.yml b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_the_same_package/1_2_8_1_1_2.yml new file mode 100644 index 00000000000..e7872f49dda --- /dev/null +++ b/src/api/spec/cassettes/Staging_StagedRequestsController/POST_create/when_providing_two_request/and_none_is_excluded/with_the_same_package/1_2_8_1_1_2.yml @@ -0,0 +1,481 @@ +--- +http_interactions: +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + <person userid="permitted_user" role="maintainer"/> + </project> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '150' + body: + encoding: UTF-8 + string: | + <project name="home:permitted_user"> + <title> + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:25 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + body: + encoding: UTF-8 + string: | + + + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '178' + body: + encoding: UTF-8 + string: | + + 97c0ecde84797bbeefe054be20471634 + + permitted_user + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:26 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + <group groupid="staging-workflow-managers-5" role="maintainer"/> + </project> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '173' + body: + encoding: UTF-8 + string: | + <project name="home:permitted_user:Staging:A"> + <title> + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:26 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/_project/_staging_workflow?user=permitted_user + body: + encoding: UTF-8 + string: | + + + + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '178' + body: + encoding: UTF-8 + string: | + + 885753dbec421426e0a792caa6d5b458 + + permitted_user + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:26 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:B/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + <group groupid="staging-workflow-managers-5" role="maintainer"/> + </project> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '173' + body: + encoding: UTF-8 + string: | + <project name="home:permitted_user:Staging:B"> + <title> + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:26 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + <person userid="permitted_user" role="maintainer"/> + <group groupid="staging-workflow-managers-5" role="reviewer"/> + </project> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '215' + body: + encoding: UTF-8 + string: | + <project name="home:permitted_user"> + <title> + + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:26 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user/target_package/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + A Catskill Eagle + Accusantium error expedita dignissimos. + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '176' + body: + encoding: UTF-8 + string: | + + A Catskill Eagle + Accusantium error expedita dignissimos. + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:26 GMT +- request: + method: put + uri: http://backend:5352/source/source_project/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + Of Mice and Men + + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '106' + body: + encoding: UTF-8 + string: | + + Of Mice and Men + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:26 GMT +- request: + method: put + uri: http://backend:5352/source/source_project/source_package/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + The Little Foxes + At quas consectetur veritatis. + + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '162' + body: + encoding: UTF-8 + string: | + + The Little Foxes + At quas consectetur veritatis. + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:26 GMT +- request: + method: get + uri: http://backend:5352/source/source_project/source_package?expand=1 + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '89' + body: + encoding: UTF-8 + string: | + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:28 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_meta?user=permitted_user + body: + encoding: UTF-8 + string: | + + + <description/> + </package> + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '131' + body: + encoding: UTF-8 + string: | + <package name="target_package" project="home:permitted_user:Staging:A"> + <title> + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:28 GMT +- request: + method: put + uri: http://backend:5352/source/home:permitted_user:Staging:A/target_package/_link?user=permitted_user + body: + encoding: UTF-8 + string: + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/xml + Cache-Control: + - no-cache + Connection: + - close + Content-Length: + - '216' + body: + encoding: UTF-8 + string: | + + d5e16cac42930eeb8421736378202c08 + unknown + + permitted_user + + + + http_version: + recorded_at: Mon, 18 Nov 2019 15:26:28 GMT +recorded_with: VCR 5.0.0 diff --git a/src/api/spec/controllers/staging/staged_requests_controller_spec.rb b/src/api/spec/controllers/staging/staged_requests_controller_spec.rb index 3613e7b81ee..7be05910d96 100644 --- a/src/api/spec/controllers/staging/staged_requests_controller_spec.rb +++ b/src/api/spec/controllers/staging/staged_requests_controller_spec.rb @@ -196,23 +196,43 @@ } end let(:body) { "#{bs_request.number}#{another_bs_request.number}" } - let(:another_bs_request) do - create(:bs_request_with_submit_action, - state: :review, - creator: other_user, - target_package: target_package, - source_package: source_package, - description: 'BsRequest 2', - number: 2, - review_by_group: group) - end before { subject } - it { expect(response).to have_http_status(:success) } - it { expect(staging_project.staged_requests).to include(bs_request) } - it { expect(staging_project.staged_requests).to include(another_bs_request) } - it { assert_select 'status[code=ok]' } + context 'with the same package' do + let(:another_bs_request) do + create(:bs_request_with_submit_action, + state: :review, + creator: other_user, + target_package: target_package, + source_package: source_package, + description: 'BsRequest 2', + number: 2, + review_by_group: group) + end + + it { expect(response).to have_http_status(:bad_request) } + it { expect(response.body).to match(/Can't stage request '#{another_bs_request.number}'/) } + end + + context 'with another package' do + let(:another_target_package) { create(:package, name: 'another_target_package', project: project) } + let(:another_bs_request) do + create(:bs_request_with_submit_action, + state: :review, + creator: other_user, + target_package: another_target_package, + source_package: source_package, + description: 'BsRequest 2', + number: 2, + review_by_group: group) + end + + it { expect(response).to have_http_status(:success) } + it { expect(staging_project.staged_requests).to include(bs_request) } + it { expect(staging_project.staged_requests).to include(another_bs_request) } + it { assert_select 'status[code=ok]' } + end end context 'and one is excluded but the other is not' do