@@ -73,7 +73,9 @@ class { 'postgresql::server':
7373 'app_test1' : { 'login' => true } ,
7474 'rep_test1' : { 'replication' => true ,
7575 'login' => true } ,
76- 'rou_test1' : { 'login' => true } , } ,
76+ 'rou_test1' : { 'login' => true } ,
77+ 'val_test1' : { 'login' => true ,
78+ 'valid_until' => '2030-01-01 00:00:00+00' } , } ,
7779 'pg_hba_rules' : { 'local all INSTANCE user' : { 'type' => 'local' ,
7880 'database' => 'all' ,
7981 'user' => 'ins_test1' ,
@@ -214,10 +216,19 @@ class { 'postgresql::server':
214216 it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "rou_test1" NOCREATEROLE' ) }
215217 it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "rou_test1" NOREPLICATION' ) }
216218 it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "rou_test1" NOSUPERUSER' ) }
219+ it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "val_test1" CONNECTION LIMIT -1' ) }
220+ it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "val_test1" INHERIT' ) }
221+ it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "val_test1" LOGIN' ) }
222+ it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "val_test1" NOCREATEDB' ) }
223+ it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "val_test1" NOCREATEROLE' ) }
224+ it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "val_test1" NOREPLICATION' ) }
225+ it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "val_test1" NOSUPERUSER' ) }
226+ it { is_expected . to contain_postgresql_psql ( 'ALTER ROLE "val_test1" VALID UNTIL \'2030-01-01 00:00:00+00\'' ) }
217227 it { is_expected . to contain_postgresql_psql ( 'CREATE ROLE app_test1 ENCRYPTED PASSWORD ****' ) }
218228 it { is_expected . to contain_postgresql_psql ( 'CREATE ROLE dba_test1 ENCRYPTED PASSWORD ****' ) }
219229 it { is_expected . to contain_postgresql_psql ( 'CREATE ROLE ins_test1 ENCRYPTED PASSWORD ****' ) }
220230 it { is_expected . to contain_postgresql_psql ( 'CREATE ROLE rep_test1 ENCRYPTED PASSWORD ****' ) }
221231 it { is_expected . to contain_postgresql_psql ( 'CREATE ROLE rou_test1 ENCRYPTED PASSWORD ****' ) }
232+ it { is_expected . to contain_postgresql_psql ( 'CREATE ROLE val_test1 ENCRYPTED PASSWORD ****' ) }
222233 end
223234end
0 commit comments