diff --git a/src/api/spec/cassettes/Packages/creating_a_package/in_a_project_owned_by_the_user/validations_are_checked.yml b/src/api/spec/cassettes/Packages/creating_a_package/in_a_project_owned_by_the_user/validations_are_checked.yml
index 0e20f3afe82..cbfa7dbb37a 100644
--- a/src/api/spec/cassettes/Packages/creating_a_package/in_a_project_owned_by_the_user/validations_are_checked.yml
+++ b/src/api/spec/cassettes/Packages/creating_a_package/in_a_project_owned_by_the_user/validations_are_checked.yml
@@ -39,16 +39,16 @@ http_interactions:
- recorded_at: Fri, 25 Jun 2021 11:33:50 GMT
+ recorded_at: Tue, 30 Apr 2024 10:25:34 GMT
- request:
method: put
- uri: http://backend:5352/source/home:package_test_user/test_package/_meta?user=user_59
+ uri: http://backend:5352/source/home:package_test_user/test_package/_meta?user=user_1
body:
encoding: UTF-8
string: |
- The Far-Distant Oxus
- Autem voluptatem omnis alias.
+ Specimen Days
+ Qui accusantium corporis natus.
headers:
Accept-Encoding:
@@ -69,21 +69,21 @@ http_interactions:
Connection:
- close
Content-Length:
- - '171'
+ - '166'
body:
encoding: UTF-8
string: |
- The Far-Distant Oxus
- Autem voluptatem omnis alias.
+ Specimen Days
+ Qui accusantium corporis natus.
- recorded_at: Fri, 25 Jun 2021 11:33:50 GMT
+ recorded_at: Tue, 30 Apr 2024 10:25:35 GMT
- request:
method: put
uri: http://backend:5352/source/home:package_test_user/test_package/_config
body:
encoding: UTF-8
- string: Aspernatur voluptate dicta. In illum vitae. Quae non unde.
+ string: Quo quia dignissimos. Minus enim dolores. Dolor illum aut.
headers:
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -103,25 +103,25 @@ http_interactions:
Connection:
- close
Content-Length:
- - '209'
+ - '207'
body:
encoding: UTF-8
string: |
-
- 787e11acd03d27552023abc5505d990e
+
+ 838b68725a238324d5da09021ce5be51
unknown
-
+
unknown
- recorded_at: Fri, 25 Jun 2021 11:33:50 GMT
+ recorded_at: Tue, 30 Apr 2024 10:25:35 GMT
- request:
method: put
uri: http://backend:5352/source/home:package_test_user/test_package/somefile.txt
body:
encoding: UTF-8
- string: Cumque non quis. Non labore voluptatem. Et quis et.
+ string: Enim delectus ipsum. Facere soluta praesentium. Iusto tempora consequatur.
headers:
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -141,19 +141,19 @@ http_interactions:
Connection:
- close
Content-Length:
- - '209'
+ - '207'
body:
encoding: UTF-8
string: |
-
- 71f2a98ddf0bda0ae195d667661d8cd3
+
+ 45aa57bafdd231b89f37abf63aeb7326
unknown
-
+
unknown
- recorded_at: Fri, 25 Jun 2021 11:33:50 GMT
+ recorded_at: Tue, 30 Apr 2024 10:25:35 GMT
- request:
method: put
uri: http://backend:5352/source/home:other_package_test_user/_meta?user=other_package_test_user
@@ -193,16 +193,16 @@ http_interactions:
- recorded_at: Fri, 25 Jun 2021 11:33:50 GMT
+ recorded_at: Tue, 30 Apr 2024 10:25:35 GMT
- request:
method: put
- uri: http://backend:5352/source/home:other_package_test_user/branch_test_package/_meta?user=user_60
+ uri: http://backend:5352/source/home:other_package_test_user/branch_test_package/_meta?user=user_2
body:
encoding: UTF-8
string: |
- In Dubious Battle
- Est enim et dolorum.
+ Behold the Man
+ Culpa reiciendis consequuntur distinctio.
headers:
Accept-Encoding:
@@ -223,21 +223,21 @@ http_interactions:
Connection:
- close
Content-Length:
- - '172'
+ - '190'
body:
encoding: UTF-8
string: |
- In Dubious Battle
- Est enim et dolorum.
+ Behold the Man
+ Culpa reiciendis consequuntur distinctio.
- recorded_at: Fri, 25 Jun 2021 11:33:50 GMT
+ recorded_at: Tue, 30 Apr 2024 10:25:35 GMT
- request:
method: put
uri: http://backend:5352/source/home:other_package_test_user/branch_test_package/_config
body:
encoding: UTF-8
- string: Ut sunt modi. Occaecati corporis modi. Molestias eum et.
+ string: Hic dolores porro. Alias aut minus. Temporibus deleniti consequatur.
headers:
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -257,25 +257,25 @@ http_interactions:
Connection:
- close
Content-Length:
- - '209'
+ - '207'
body:
encoding: UTF-8
string: |
-
- 55cf997f55afaca5734f2c7de7abad30
+
+ 084e0f70c8a9742654d9f70419f49f4d
unknown
-
+
unknown
- recorded_at: Fri, 25 Jun 2021 11:33:50 GMT
+ recorded_at: Tue, 30 Apr 2024 10:25:35 GMT
- request:
method: put
uri: http://backend:5352/source/home:other_package_test_user/branch_test_package/somefile.txt
body:
encoding: UTF-8
- string: Est quo rerum. Dolor laudantium voluptate. Quo error aut.
+ string: Nulla corrupti quod. Sint molestiae ipsa. Fuga repellendus facere.
headers:
Accept-Encoding:
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
@@ -295,17 +295,85 @@ http_interactions:
Connection:
- close
Content-Length:
- - '209'
+ - '207'
body:
encoding: UTF-8
string: |
-
- add7d1529836f0d3770822583f86c8ff
+
+ a20a7d62c2b63598cf4ba80ceb2ba29e
unknown
-
+
unknown
- recorded_at: Fri, 25 Jun 2021 11:33:50 GMT
-recorded_with: VCR 6.0.0
+ recorded_at: Tue, 30 Apr 2024 10:25:35 GMT
+- request:
+ method: get
+ uri: http://backend:5352/build/home:package_test_user/_result?code=unresolvable&view=status
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ X-Request-Id:
+ - 3b468131-3ad4-4dd5-bb87-042b89c76ca1
+ 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:
+ - '55'
+ body:
+ encoding: UTF-8
+ string: '
+
+'
+ recorded_at: Tue, 30 Apr 2024 10:25:42 GMT
+- request:
+ method: get
+ uri: http://backend:5352/build/home:package_test_user/_result?view=summary
+ body:
+ encoding: US-ASCII
+ string: ''
+ headers:
+ X-Request-Id:
+ - 61ab876b-dea5-4e3c-9044-77cef2307f21
+ 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:
+ - '55'
+ body:
+ encoding: UTF-8
+ string: '
+
+'
+ recorded_at: Tue, 30 Apr 2024 10:25:43 GMT
+recorded_with: VCR 6.2.0
diff --git a/src/api/spec/controllers/webui/package_controller_spec.rb b/src/api/spec/controllers/webui/package_controller_spec.rb
index 046eae7ba97..a2985999e60 100644
--- a/src/api/spec/controllers/webui/package_controller_spec.rb
+++ b/src/api/spec/controllers/webui/package_controller_spec.rb
@@ -782,15 +782,15 @@
context 'invalid package name' do
let(:package_name) { 'A' * 250 }
- it { expect(response).to redirect_to(new_package_path(source_project)) }
- it { expect(flash[:error]).to match("Invalid package name:\s.*") }
+ it { expect(response).to redirect_to(project_show_path(source_project)) }
+ it { expect(flash[:error]).to match('Failed to create package: Name is too long (maximum is 200 characters), Name is illegal') }
end
context 'package already exist' do
let(:package_name) { package.name }
- it { expect(response).to redirect_to(new_package_path(source_project)) }
- it { expect(flash[:error]).to start_with("Package '#{package.name}' already exists in project") }
+ it { expect(response).to redirect_to(project_show_path(source_project)) }
+ it { expect(flash[:error]).to start_with("Failed to create package: Project `#{source_project.name}` already has a package with the name `#{package_name}`") }
end
context 'not allowed to create package in' do
diff --git a/src/api/spec/features/webui/packages_spec.rb b/src/api/spec/features/webui/packages_spec.rb
index d02ee6e963d..6c8af279bc1 100644
--- a/src/api/spec/features/webui/packages_spec.rb
+++ b/src/api/spec/features/webui/packages_spec.rb
@@ -343,8 +343,8 @@
fill_in 'package_name', with: 'cool stuff'
click_button('Create')
- expect(page).to have_text("Invalid package name: 'cool stuff'")
- expect(page).to have_current_path("/package/new/#{user.home_project_name}", ignore_query: true)
+ expect(page).to have_text('Failed to create package: Name is illegal')
+ expect(page).to have_current_path("/project/show/#{user.home_project_name}", ignore_query: true)
end
it 'creates a package' do