Commit adc7dbeb authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'ml-update-ssh-key-test-resource-rake-task' into 'master'

SSH Key E2E updates

See merge request gitlab-org/gitlab!38442
parents 3e5ff4a2 1d562121
...@@ -42,12 +42,6 @@ desc "Generate data and run load tests" ...@@ -42,12 +42,6 @@ desc "Generate data and run load tests"
task generate_data_and_run_load_test: [:generate_perf_testdata, :run_artillery_load_tests] task generate_data_and_run_load_test: [:generate_perf_testdata, :run_artillery_load_tests]
desc "Deletes test ssh keys a user" desc "Deletes test ssh keys a user"
task :delete_test_ssh_keys, [:title_portion, :delete_before] do |t, args| task :delete_test_ssh_keys, [:title_portion, :delete_before, :dry_run] do |t, args|
QA::Tools::DeleteTestSSHKeys.new(args).run
end
desc "Dry run of deleting test ssh keys for a user. Lists keys to be deleted"
task :delete_test_ssh_keys_dry_run, [:title_portion, :delete_before] do |t, args|
args.with_defaults(dry_run: true)
QA::Tools::DeleteTestSSHKeys.new(args).run QA::Tools::DeleteTestSSHKeys.new(args).run
end end
...@@ -14,6 +14,7 @@ module QA ...@@ -14,6 +14,7 @@ module QA
def initialize def initialize
self.title = Time.now.to_f self.title = Time.now.to_f
@expires_at = Date.today + 2
end end
def key def key
......
...@@ -24,10 +24,10 @@ module QA ...@@ -24,10 +24,10 @@ module QA
Page::Main::Menu.perform(&:click_settings_link) Page::Main::Menu.perform(&:click_settings_link)
Page::Profile::Menu.perform(&:click_ssh_keys) Page::Profile::Menu.perform(&:click_ssh_keys)
Page::Profile::SSHKeys.perform do |ssh_keys| Page::Profile::SSHKeys.perform do |ssh_keys|
ssh_keys.remove_key(key_title) ssh_keys.remove_key(key.title)
end end
expect(page).not_to have_content("Title: #{key_title}") expect(page).not_to have_content("Title: #{key.title}")
expect(page).not_to have_content(key.md5_fingerprint) expect(page).not_to have_content(key.md5_fingerprint)
end end
end end
......
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