Order-dependent failure in spec/helpers/import_helper_spec.rb
$ bundle exec rspec spec/services/projects/update_service_spec.rb spec/helpers/import_helper_spec.rb
==> Setting up GitLab Shell...
GitLab Shell setup in 0.902465 seconds...
==> Setting up Gitaly...
Warning
You are running as user seanmcgivern, we hope you know what you are doing.
Things may work/fail for the wrong reasons.
For correct results you should run this as user git.
Gitaly setup in 56.78468 seconds...
Projects::UpdateService#execute
returns an error result when record cannot be updated
#execute
when changing visibility level
when visibility_level is INTERNAL
updates the project to internal
when visibility_level is PUBLIC
updates the project to public
when visibility levels are restricted to PUBLIC only
when visibility_level is INTERNAL
updates the project to internal
when visibility_level is PUBLIC
does not update the project to public
when updated by an admin
updates the project to public
when project visibility is higher than parent group
does not update project visibility level
when updating project that has forks
updates forks visibility level when parent set to more restrictive
does not update forks visibility level when parent set to less restrictive
when updating a default branch
changes a default branch
does not change a default branch
when we update project but not enabling a wiki
does not try to create an empty wiki
handles empty project feature attributes
when enabling a wiki
creates a wiki
logs an error and creates a metric when wiki can not be created
when updating a project that contains container images
does not allow to rename the project
allows to update other settings
when renaming a project
with legacy storage
does not allow renaming when new path matches existing repository on disk
with hashed storage
does not check if new path matches existing repository on disk
when passing invalid parameters
returns an error result when record cannot be updated
#run_auto_devops_pipeline?
when master contains a .gitlab-ci.yml file
should eq false
when auto devops is explicitly enabled
should eq true
when auto devops is explicitly disabled
should eq false
when auto devops is set to instance setting
when auto devops is enabled system-wide
should eq true
when auto devops is disabled system-wide
should eq false
repository_storage
calls the change repository storage method if the storage changed
doesn't call the change repository storage for non-admin users
repository_size_limit assignment as Bytes
when param present
converts from MB to Bytes
when param not present
assign nil value
ImportHelper
#import_project_target
when current user can create namespaces
returns project namespace
when current user can not create namespaces
takes the current user's namespace
#provider_project_link
when provider is "github"
when provider does not specify a custom URL
uses default GitHub URL (FAILED - 1)
when provider specify a custom URL
uses custom URL
when custom URL contains a '/' char at the end
doesn't render double slash
when provider is missing
uses the default URL
when provider is "gitea"
uses given host
Failures:
1) ImportHelper#provider_project_link when provider is "github" when provider does not specify a custom URL uses default GitHub URL
Failure/Error: provider&.dig('url').presence || 'https://github.com'
ArgumentError:
wrong number of arguments (given 1, expected 0)
# (eval):1:in `default'
# ./app/helpers/import_helper.rb:87:in `dig'
# ./app/helpers/import_helper.rb:87:in `block in github_root_url'
# ./lib/gitlab/utils/strong_memoize.rb:26:in `strong_memoize'
# ./app/helpers/import_helper.rb:84:in `github_root_url'
# ./app/helpers/import_helper.rb:80:in `github_project_url'
# ./app/helpers/import_helper.rb:14:in `provider_project_link'
# ./spec/helpers/import_helper_spec.rb:41:in `block (5 levels) in <top (required)>'
Finished in 1 minute 10.35 seconds (files took 33.59 seconds to load)
36 examples, 1 failure
Failed examples:
rspec ./spec/helpers/import_helper_spec.rb:40 # ImportHelper#provider_project_link when provider is "github" when provider does not specify a custom URL uses default GitHub URL
As seen in https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/57603903.
Note that while both these files exist in CE, spec/services/projects/update_service_spec.rb
has EE additions.