-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SNOW-955536: Add multiple SAML integration
- Loading branch information
1 parent
fa1b879
commit 017c8c8
Showing
6 changed files
with
155 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -894,6 +894,50 @@ public void TestSSOConnectionWithUserAsync() | |
} | ||
} | ||
|
||
[Test] | ||
[Ignore("This test requires manual interaction and therefore cannot be run in CI")] | ||
public void TestSSOConnectionWithUserAndDisableConsoleLogin() | ||
{ | ||
// Use external browser to log in using proper password for [email protected] | ||
using (IDbConnection conn = new SnowflakeDbConnection()) | ||
{ | ||
conn.ConnectionString | ||
= ConnectionStringWithoutAuth | ||
+ ";authenticator=externalbrowser;[email protected];disable_console_login=false;"; | ||
conn.Open(); | ||
Assert.AreEqual(ConnectionState.Open, conn.State); | ||
using (IDbCommand command = conn.CreateCommand()) | ||
{ | ||
command.CommandText = "SELECT CURRENT_USER()"; | ||
Assert.AreEqual("QA", command.ExecuteScalar().ToString()); | ||
} | ||
} | ||
} | ||
|
||
[Test] | ||
[Ignore("This test requires manual interaction and therefore cannot be run in CI")] | ||
public void TestSSOConnectionWithUserAsyncAndDisableConsoleLogin() | ||
{ | ||
// Use external browser to log in using proper password for [email protected] | ||
using (SnowflakeDbConnection conn = new SnowflakeDbConnection()) | ||
{ | ||
conn.ConnectionString | ||
= ConnectionStringWithoutAuth | ||
+ ";authenticator=externalbrowser;[email protected];disable_console_login=false;"; | ||
|
||
Task connectTask = conn.OpenAsync(CancellationToken.None); | ||
connectTask.Wait(); | ||
Assert.AreEqual(ConnectionState.Open, conn.State); | ||
using (DbCommand command = conn.CreateCommand()) | ||
{ | ||
command.CommandText = "SELECT CURRENT_USER()"; | ||
Task<object> task = command.ExecuteScalarAsync(CancellationToken.None); | ||
task.Wait(CancellationToken.None); | ||
Assert.AreEqual("QA", task.Result); | ||
} | ||
} | ||
} | ||
|
||
[Test] | ||
[Ignore("This test requires manual interaction and therefore cannot be run in CI")] | ||
public void TestSSOConnectionTimeoutAfter10s() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters