From d2c808f99edb5791dae3c242a099248822df4bbc Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Fri, 27 Sep 2024 16:31:29 -0400 Subject: [PATCH] simplify fix_auth tests There is an issue in the way that encryption keys work. You can sometimes decrypt a string that has been encoded with a different passkey. You will get the wrong value out, but the system thinks that it succeeded. Even though the odds of this are very low, since we run managiq so many times, we run across it as a sporadic test failure. This is an issue and we're removing the offending tests. This functionality is tested in the `manageiq-password` gem. --- spec/tools/fix_auth/auth_model_spec.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spec/tools/fix_auth/auth_model_spec.rb b/spec/tools/fix_auth/auth_model_spec.rb index eb1ed6524fd..ccb3c34f1e8 100644 --- a/spec/tools/fix_auth/auth_model_spec.rb +++ b/spec/tools/fix_auth/auth_model_spec.rb @@ -78,11 +78,6 @@ expect { subject.fix_passwords(bad, options) }.to raise_error(ManageIQ::Password::PasswordError) end - it "should replace for bad encryption" do - subject.fix_passwords(bad, options.merge(:invalid => "other")) - expect(bad.password).to be_encrypted("other") - end - context "with the rare case where recryption succeeds but returns garbage" do # NOTE: This legacy key only returns garbage specifically with the # built-in v2_key.dev and the plaintext string "password", which is