Skip to content

Commit 35f6b53

Browse files
committed
skip auth on local runs
1 parent df94621 commit 35f6b53

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ui-tests-starter/tst-prep/PreAmazonQUiTest.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ class PreAmazonQUiTest {
3939
@Test
4040
fun `can set up Connection`() {
4141
try {
42-
val startUrl = System.getenv("TEST_START_URL")
43-
val region = System.getenv("TEST_REGION")
44-
connection = LegacyManagedBearerSsoConnection(startUrl, region, Q_SCOPES)
45-
ConnectionPinningManager.getInstance().setPinnedConnection(QConnection.getInstance(), connection)
46-
(connection.getConnectionSettings().tokenProvider.delegate as BearerTokenProvider).reauthenticate()
42+
if (System.getenv("CI").toBoolean()) {
43+
val startUrl = System.getenv("TEST_START_URL")
44+
val region = System.getenv("TEST_REGION")
45+
connection = LegacyManagedBearerSsoConnection(startUrl, region, Q_SCOPES)
46+
ConnectionPinningManager.getInstance().setPinnedConnection(QConnection.getInstance(), connection)
47+
(connection.getConnectionSettings().tokenProvider.delegate as BearerTokenProvider).reauthenticate()
48+
}
4749
} catch (e: Exception) {
4850
error("Could not connect to Idc.")
4951
}

0 commit comments

Comments
 (0)