JH need more complex passwords
What does this MR do and why?
JH need more complex pwd or our SaaS can never online since the law policy of China.
I add validation of password_complexity in JH see gitlab-jh/gitlab!210 (diffs)
and the jobs of pipeline were almost all red see https://gitlab.com/gitlab-jh/gitlab/-/pipelines/424233129, since many test examples using https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/factories/users.rb#L8 to create(:user) with a weak password like 12345678
.
So we need to a stronger one (123qweQWE!@#
) which is like in this MR to let the pipeline green.
I know this style of coding maybe not acceptable, but it's a tmp quick solution.
I tried to override it under JH, but sadly not work. I created jh/spec/factories/users.rb
to spec/factories/users.rb
and change like
# frozen_string_literal: true
FactoryBot.modify do
factory :user, aliases: [:author, :assignee, :recipient, :owner, :resource_owner] do
email { generate(:email) }
name { generate(:name) }
username { generate(:username) }
password { "123qweQWE!@#" }
...
besides, there are many other tests red... see https://gitlab.com/gitlab-jh/gitlab/-/pipelines/424963554
@godfat-gitlab Could you please help see this, thanks!
CC @qianzhangxa