• Peter Leitzen's avatar
    Ensure that migration specs work without bot_type · bec87301
    Peter Leitzen authored
    Before this commit some migration specs failed with
    
        4) Gitlab::BackgroundMigration::DeleteDiffFiles#perform when diff
           files can be deleted rollsback if something goes wrong
           Failure/Error: return false if internal?
    
           NameError:
             undefined local variable or method `bot_type' for
               #<User id: @namespace1117>
             Did you mean?  bot_type=
                            bot_type?
           # ./ee/app/models/ee/user.rb:281:in `bot?'
           # ./ee/app/models/ee/user.rb:277:in `internal?'
           # ./app/models/user.rb:1452:in `password_required?'
           # ./ee/app/models/ee/user.rb:290:in `password_required?'
    
    https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/185393284
    
    It's because we migrate down before each migration spec which actually
    introduces `bot_type`.
    bec87301
user.rb 8.64 KB