1515import java .text .SimpleDateFormat ;
1616import java .util .Date ;
1717import java .util .Properties ;
18+ import net .snowflake .client .category .TestTags ;
1819import org .junit .jupiter .api .BeforeEach ;
20+ import org .junit .jupiter .api .Tag ;
1921import org .junit .jupiter .api .Test ;
2022
23+ @ Tag (TestTags .AUTHENTICATION )
2124public class PATLatestIT {
2225
2326 AuthTestHelper authTestHelper ;
@@ -34,8 +37,7 @@ public void setUp() throws IOException {
3437 @ Test
3538 void shouldAuthenticateUsingPAT () {
3639 Properties properties = getPATConnectionParameters ();
37- token = getPAT ();
38- properties .put ("token" , token );
40+ properties .put ("token" , getPAT ());
3941 authTestHelper .connectAndExecuteSimpleQuery (properties , null );
4042 authTestHelper .verifyExceptionIsNotThrown ();
4143 removePAT ();
@@ -52,8 +54,7 @@ void shouldThrowErrorForInvalidPAT() {
5254 @ Test
5355 void shouldThrowErrorForMismatchedPATUsername () throws IOException {
5456 Properties properties = getPATConnectionParameters ();
55- token = getPAT ();
56- properties .put ("token" , token );
57+ properties .put ("token" , getPAT ());
5758 properties .put ("user" , "differentUsername" );
5859 authTestHelper .connectAndExecuteSimpleQuery (properties , null );
5960 authTestHelper .verifyExceptionIsThrown ("Programmatic access token is invalid." );
0 commit comments