Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit47ab5d2

Browse files
committed
Fix role names in src/test/authentication/t/005_login_trigger.pl
Per buildfarm member longfin.
1 parent20b7708 commit47ab5d2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎src/test/authentication/t/005_login_trigger.pl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ sub psql_command
9494

9595
# Create temporary roles and log table
9696
psql_command(
97-
$node,'CREATE ROLEalice WITH LOGIN;
98-
CREATE ROLEmallory WITH LOGIN;
97+
$node,'CREATE ROLEregress_alice WITH LOGIN;
98+
CREATE ROLEregress_mallory WITH LOGIN;
9999
CREATE TABLE user_logins(id serial, who text);
100100
GRANT SELECT ON user_logins TO public;
101101
', 0,'create tmp objects',
@@ -109,7 +109,7 @@ sub psql_command
109109
'CREATE FUNCTION on_login_proc() RETURNS event_trigger AS $$
110110
BEGIN
111111
INSERT INTO user_logins (who) VALUES (SESSION_USER);
112-
IF SESSION_USER =\'mallory\' THEN
112+
IF SESSION_USER =\'regress_mallory\' THEN
113113
RAISE EXCEPTION\'Hello %! You are NOT welcome here!\', SESSION_USER;
114114
END IF;
115115
RAISE NOTICE\'Hello %! You are welcome!\', SESSION_USER;
@@ -140,29 +140,29 @@ BEGIN
140140

141141
# Try to log as allowed Alice and disallowed Mallory (two times)
142142
psql_command(
143-
$node,'SELECT 1;', 0,'tryalice',
144-
connstr=>'user=alice',
143+
$node,'SELECT 1;', 0,'tryregress_alice',
144+
connstr=>'user=regress_alice',
145145
log_exact=>'1',
146146
err_like=> [qr/You are welcome/],
147147
err_unlike=> [qr/You are NOT welcome/]);
148148
psql_command(
149-
$node,'SELECT 1;', 2,'trymallory',
150-
connstr=>'user=mallory',
149+
$node,'SELECT 1;', 2,'tryregress_mallory',
150+
connstr=>'user=regress_mallory',
151151
log_exact=>'',
152152
err_like=> [qr/You are NOT welcome/],
153153
err_unlike=> [qr/You are welcome/]);
154154
psql_command(
155-
$node,'SELECT 1;', 2,'trymallory',
156-
connstr=>'user=mallory',
155+
$node,'SELECT 1;', 2,'tryregress_mallory',
156+
connstr=>'user=regress_mallory',
157157
log_exact=>'',
158158
err_like=> [qr/You are NOT welcome/],
159159
err_unlike=> [qr/You are welcome/]);
160160

161161
# Check that Alice's login record is here, while the Mallory's one is not
162162
psql_command(
163163
$node,'SELECT * FROM user_logins;', 0,'select *',
164-
log_like=> [qr/3\|alice/],
165-
log_unlike=> [qr/mallory/],
164+
log_like=> [qr/3\|regress_alice/],
165+
log_unlike=> [qr/regress_mallory/],
166166
err_like=> [qr/You are welcome/]);
167167

168168
# Check total number of successful logins so far
@@ -180,8 +180,8 @@ BEGIN
180180
psql_command(
181181
$node,'DROP TABLE user_logins;
182182
DROP FUNCTION on_login_proc;
183-
DROP ROLEmallory;
184-
DROP ROLEalice;
183+
DROP ROLEregress_mallory;
184+
DROP ROLEregress_alice;
185185
', 0,'cleanup',
186186
log_exact=>'',
187187
err_exact=>'');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp