From 6cd11aaef347cf34b2c0a904a0a0c4b0c264997d Mon Sep 17 00:00:00 2001 From: Kathy Lussier Date: Wed, 15 Mar 2017 08:37:25 -0400 Subject: [PATCH] LP#1673059: Update passwd storage test The passwd storage PgTAP test is failing because the user ids shifted when new sample records were added to the actor.usr table in the Concerto dataset. This branch changes the id in the test to point to the correct user. Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- .../sql/Pg/live_t/lp1468422_passwd_storage.pg | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/sql/Pg/live_t/lp1468422_passwd_storage.pg b/Open-ILS/src/sql/Pg/live_t/lp1468422_passwd_storage.pg index 30c8ad1ee6..18b7cdd805 100644 --- a/Open-ILS/src/sql/Pg/live_t/lp1468422_passwd_storage.pg +++ b/Open-ILS/src/sql/Pg/live_t/lp1468422_passwd_storage.pg @@ -19,30 +19,30 @@ SELECT plan(6); SELECT ok( (SELECT TRUE AS verify_old_pw FROM actor.usr - WHERE id = 187 AND passwd = MD5('montyc1234')), + WHERE id = 189 AND passwd = MD5('montyc1234')), 'Legacy password should match' ); SELECT isnt_empty( - 'SELECT actor.get_salt(187, ''main'')', + 'SELECT actor.get_salt(189, ''main'')', 'get_salt() returns a new salt' ); SELECT isnt_empty( - 'SELECT * FROM actor.passwd WHERE usr = 187 AND passwd_type = ''main''', + 'SELECT * FROM actor.passwd WHERE usr = 189 AND passwd_type = ''main''', 'get_salt() should migrate the password' ); SELECT ok( - (SELECT actor.verify_passwd(187, 'main', - MD5(actor.get_salt(187, 'main') || MD5('montyc1234')))), + (SELECT actor.verify_passwd(189, 'main', + MD5(actor.get_salt(189, 'main') || MD5('montyc1234')))), 'verify_passwd should verify migrated password' ); SELECT ok( (SELECT NOT ( - SELECT actor.verify_passwd(187, 'main', - MD5(actor.get_salt(187, 'main') || MD5('BADPASSWORD')))) + SELECT actor.verify_passwd(189, 'main', + MD5(actor.get_salt(189, 'main') || MD5('BADPASSWORD')))) ), 'verify_passwd should fail with wrong password' ); @@ -55,12 +55,12 @@ BEGIN -- calls will create a new one. SELECT INTO new_salt actor.create_salt('main'); PERFORM actor.set_passwd( - 187, 'main', MD5(new_salt || MD5('bobblehead')), new_salt); + 189, 'main', MD5(new_salt || MD5('bobblehead')), new_salt); END $$; SELECT ok( - (SELECT actor.verify_passwd(187, 'main', - MD5(actor.get_salt(187, 'main') || MD5('bobblehead')))), + (SELECT actor.verify_passwd(189, 'main', + MD5(actor.get_salt(189, 'main') || MD5('bobblehead')))), 'verify_passwd should verify new password' ); -- 2.43.2