-
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: Multiple SAML Integration (#852)
### Description Add multiple SAML Integration ### Checklist - [x] Code compiles correctly - [x] Code is formatted according to [Coding Conventions](../CodingConventions.md) - [x] Created tests which fail without the change (if possible) - [x] All tests passing (`dotnet test`) - [x] Extended the README / documentation, if necessary - [x] Provide JIRA issue id (if possible) or GitHub issue id in PR name
- Loading branch information
1 parent
7d478f0
commit fa09941
Showing
6 changed files
with
149 additions
and
17 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