@@ -103,6 +103,48 @@ def azure_browser_idp():
103
103
return db_connect
104
104
105
105
106
+ @pytest .fixture (scope = "class" )
107
+ def azure_idp ():
108
+ db_connect = {
109
+ "database" : conf .get ("database" , "database" ),
110
+ "host" : conf .get ("database" , "host" ),
111
+ "port" : conf .getint ("database" , "port" ),
112
+ "db_user" : conf .get ("database" , "user" ),
113
+ "ssl" : conf .getboolean ("database" , "ssl" ),
114
+ "sslmode" : conf .get ("database" , "sslmode" ),
115
+ "password" : conf .get ("azure-idp" , "password" ),
116
+ "iam" : conf .getboolean ("azure-idp" , "iam" ),
117
+ "user" : conf .get ("azure-idp" , "user" ),
118
+ "credentials_provider" : conf .get ("azure-idp" , "credentials_provider" ),
119
+ "region" : conf .get ("azure-idp" , "region" ),
120
+ "cluster_identifier" : conf .get ("azure-idp" , "cluster_identifier" ),
121
+ "idp_tenant" : conf .get ("azure-idp" , "idp_tenant" ),
122
+ "client_id" : conf .get ("azure-idp" , "client_id" ),
123
+ "client_secret" : conf .get ("azure-idp" , "client_secret" ),
124
+ }
125
+ return db_connect
126
+
127
+
128
+ @pytest .fixture (scope = "class" )
129
+ def adfs_idp ():
130
+ db_connect = {
131
+ "database" : conf .get ("database" , "database" ),
132
+ "host" : conf .get ("database" , "host" ),
133
+ "port" : conf .getint ("database" , "port" ),
134
+ "db_user" : conf .get ("database" , "user" ),
135
+ "ssl" : conf .getboolean ("database" , "ssl" ),
136
+ "sslmode" : conf .get ("database" , "sslmode" ),
137
+ "password" : conf .get ("adfs-idp" , "password" ),
138
+ "iam" : conf .getboolean ("adfs-idp" , "iam" ),
139
+ "user" : conf .get ("adfs-idp" , "user" ),
140
+ "credentials_provider" : conf .get ("adfs-idp" , "credentials_provider" ),
141
+ "region" : conf .get ("adfs-idp" , "region" ),
142
+ "cluster_identifier" : conf .get ("adfs-idp" , "cluster_identifier" ),
143
+ "idp_host" : conf .get ("adfs-idp" , "idp_host" ),
144
+ }
145
+ return db_connect
146
+
147
+
106
148
@pytest .fixture
107
149
def con (request , db_kwargs ):
108
150
conn = redshift_connector .connect (** db_kwargs )
@@ -129,6 +171,11 @@ def fin():
129
171
return cursor
130
172
131
173
174
+ @pytest .fixture
175
+ def idp_arg (request ):
176
+ return request .getfixturevalue (request .param )
177
+
178
+
132
179
@pytest .fixture
133
180
def is_java ():
134
181
return "java" in sys .platform .lower ()
0 commit comments