Commit 0f32d802 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-shl-fix-flaky-2fa-ssh-recovery-spec' into 'master'

Fix issue where port was replaced in hostname

See merge request gitlab-org/gitlab!45530
parents 21b082b0 2b41cc8d
...@@ -22,7 +22,7 @@ module QA ...@@ -22,7 +22,7 @@ module QA
it 'allows 2FA code recovery via ssh' do it 'allows 2FA code recovery via ssh' do
recovery_code = Support::SSH.perform do |ssh| recovery_code = Support::SSH.perform do |ssh|
ssh.key = ssh_key ssh.key = ssh_key
ssh.uri = address.gsub(uri.port.to_s, ssh_port) ssh.uri = address.gsub(/(?<=:)(#{uri.port})/, ssh_port)
ssh.setup ssh.setup
output = ssh.reset_2fa_codes output = ssh.reset_2fa_codes
output.scan(/([A-Za-z0-9]{16})\n/).flatten.first output.scan(/([A-Za-z0-9]{16})\n/).flatten.first
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment