Skip to content

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, since many test examples using 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

@godfat-gitlab Could you please help see this, thanks!

CC @qianzhangxa

Edited by Rémy Coutable

Merge request reports