Skip to content

Commit

Permalink
comment oauth test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pcyrek committed Jan 29, 2025
1 parent 21acb6e commit 6eb6251
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions Snowflake.Data.Tests/AuthenticationTests/OauthConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,19 @@ public void TestAuthenticateUsingOauthInvalidToken()
authTestHelper.ConnectAndExecuteSimpleQuery(_connectionString);
authTestHelper.VerifyExceptionIsThrown("Invalid OAuth access token");
}

[Test, Ignore("Skipped, waits for SNOW-1893041")]
public void TestAuthenticateUsingOauthMismatchedUser()
{
AuthTestHelper authTestHelper = new AuthTestHelper();

string token = AuthConnectionString.GetOauthToken();
var parameters = AuthConnectionString.GetOauthConnectionString(token);
parameters[SFSessionProperty.USER] = "fakeAccount";
_connectionString = AuthConnectionString.SetOauthConnectionString(parameters) + ";poolingEnabled=false;minPoolSize=0;";

authTestHelper.ConnectAndExecuteSimpleQuery(_connectionString);
authTestHelper.VerifyExceptionIsThrown("The user you were trying to authenticate as differs from the user tied to the access token");

}
//"Skipped, waits for SNOW-1893041"
// [Test, IgnoreOnCI]
// public void TestAuthenticateUsingOauthMismatchedUser()
// {
// AuthTestHelper authTestHelper = new AuthTestHelper();
//
// string token = AuthConnectionString.GetOauthToken();
// var parameters = AuthConnectionString.GetOauthConnectionString(token);
// parameters[SFSessionProperty.USER] = "fakeAccount";
// _connectionString = AuthConnectionString.SetOauthConnectionString(parameters) + ";poolingEnabled=false;minPoolSize=0;";
//
// authTestHelper.ConnectAndExecuteSimpleQuery(_connectionString);
// authTestHelper.VerifyExceptionIsThrown("The user you were trying to authenticate as differs from the user tied to the access token");
// }
}
}

0 comments on commit 6eb6251

Please sign in to comment.