Skip to content

Commit 47c4d00

Browse files
committed
test(auth): test invalid db_groups vals result in server error
1 parent 94c5ebb commit 47c4d00

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/integration/plugin/test_credentials_providers.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@ def testPreferredRole(idp_arg):
106106
redshift_connector.connect(**idp_arg)
107107

108108

109+
@pytest.mark.parametrize("idp_arg", NON_BROWSER_IDP, indirect=True)
110+
def test_invalid_db_group(idp_arg):
111+
idp_arg["db_groups"] = ["girl_dont_do_it"]
112+
with pytest.raises(
113+
redshift_connector.ProgrammingError, match='Group "{}" does not exist'.format(idp_arg["db_groups"][0])
114+
):
115+
redshift_connector.connect(**idp_arg)
116+
117+
109118
@pytest.mark.parametrize("idp_arg", ALL_IDP, indirect=True)
110119
def testSslAndIam(idp_arg):
111120
idp_arg["ssl"] = False

0 commit comments

Comments
 (0)