Skip to content

Commit eba8118

Browse files
committed
chore: always run unsigned binaries in the UTs
1 parent 0ad2121 commit eba8118

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/test/kotlin/com/coder/toolbox/cli/CoderCLIManagerTest.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import com.jetbrains.toolbox.api.remoteDev.ui.EnvironmentUiPageManager
4242
import com.jetbrains.toolbox.api.ui.ToolboxUi
4343
import com.squareup.moshi.JsonEncodingException
4444
import com.sun.net.httpserver.HttpServer
45+
import io.mockk.coEvery
4546
import io.mockk.mockk
4647
import kotlinx.coroutines.CoroutineScope
4748
import kotlinx.coroutines.runBlocking
@@ -56,6 +57,7 @@ import java.net.URL
5657
import java.nio.file.AccessDeniedException
5758
import java.nio.file.Path
5859
import java.util.UUID
60+
import kotlin.test.BeforeTest
5961
import kotlin.test.Test
6062
import kotlin.test.assertContains
6163
import kotlin.test.assertEquals
@@ -68,8 +70,9 @@ private const val VERSION_FOR_PROGRESS_REPORTING = "v2.13.1-devel+de07351b8"
6870
private val noOpTextProgress: (String) -> Unit = { _ -> }
6971

7072
internal class CoderCLIManagerTest {
73+
private val ui = mockk<ToolboxUi>(relaxed = true)
7174
private val context = CoderToolboxContext(
72-
mockk<ToolboxUi>(relaxed = true),
75+
ui,
7376
mockk<EnvironmentUiPageManager>(),
7477
mockk<EnvironmentStateColorPalette>(),
7578
mockk<RemoteToolsHelper>(),
@@ -87,6 +90,11 @@ internal class CoderCLIManagerTest {
8790
mockk<ToolboxProxySettings>()
8891
)
8992

93+
@BeforeTest
94+
fun setup() {
95+
coEvery { ui.showYesNoPopup(any(), any(), any(), any()) } returns true
96+
}
97+
9098
/**
9199
* Return the contents of a script that contains the string.
92100
*/

0 commit comments

Comments
 (0)