Skip to content

Commit 9799fbd

Browse files
committed
Fix Windows test failure - allow Python SDK paths in VfsRootAccess
Windows Python plugin scans for interpreters during test startup, needs access to C:/Program Files for PyPy detection
1 parent ff00481 commit 9799fbd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonq/clients/AmazonQStreamingClientTest.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
package software.aws.toolkits.jetbrains.services.amazonq.clients
55

6+
import com.intellij.openapi.util.SystemInfo
7+
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess
68
import com.intellij.testFramework.RuleChain
79
import com.intellij.testFramework.replaceService
810
import kotlinx.coroutines.runBlocking
@@ -54,6 +56,12 @@ class AmazonQStreamingClientTest : AmazonQTestBase() {
5456
@Before
5557
override fun setup() {
5658
super.setup()
59+
60+
// Allow Python paths on Windows for test environment (Python plugin scans for interpreters)
61+
if (SystemInfo.isWindows) {
62+
VfsRootAccess.allowRootAccess(disposableRule.disposable, "C:/Program Files")
63+
}
64+
5765
amazonQStreamingClient = AmazonQStreamingClient.getInstance(projectRule.project)
5866
ssoClient = mockClientManagerRule.create()
5967

0 commit comments

Comments
 (0)