Skip to content

Commit 5c46d79

Browse files
committed
chore: fix UTs
which now expect Content-Type to be present on the response
1 parent 5ff9d2c commit 5c46d79

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

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

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ internal class CoderCLIManagerTest {
137137
}
138138

139139
val body = response.toByteArray()
140+
exchange.responseHeaders["Content-Type"] = "application/octet-stream"
140141
exchange.sendResponseHeaders(code, if (code == HttpURLConnection.HTTP_OK) body.size.toLong() else -1)
141142
exchange.responseBody.write(body)
142143
exchange.close()
@@ -197,11 +198,11 @@ internal class CoderCLIManagerTest {
197198
val ccm = CoderCLIManager(
198199
context.copy(
199200
settingsStore = CoderSettingsStore(
200-
pluginTestSettingsStore(
201-
DATA_DIRECTORY to tmpdir.resolve("cli-dir-fail-to-write").toString(),
202-
),
203-
Environment(),
204-
context.logger
201+
pluginTestSettingsStore(
202+
DATA_DIRECTORY to tmpdir.resolve("cli-dir-fail-to-write").toString(),
203+
),
204+
Environment(),
205+
context.logger
205206
)
206207
),
207208
url
@@ -307,11 +308,11 @@ internal class CoderCLIManagerTest {
307308
val ccm = CoderCLIManager(
308309
context.copy(
309310
settingsStore = CoderSettingsStore(
310-
pluginTestSettingsStore(
311-
DATA_DIRECTORY to tmpdir.resolve("does-not-exist").toString(),
312-
),
313-
Environment(),
314-
context.logger
311+
pluginTestSettingsStore(
312+
DATA_DIRECTORY to tmpdir.resolve("does-not-exist").toString(),
313+
),
314+
Environment(),
315+
context.logger
315316
)
316317
),
317318
URL("https://foo")
@@ -329,12 +330,12 @@ internal class CoderCLIManagerTest {
329330
val ccm = CoderCLIManager(
330331
context.copy(
331332
settingsStore = CoderSettingsStore(
332-
pluginTestSettingsStore(
333-
FALLBACK_ON_CODER_FOR_SIGNATURES to "allow",
334-
DATA_DIRECTORY to tmpdir.resolve("overwrite-cli").toString(),
335-
),
336-
Environment(),
337-
context.logger
333+
pluginTestSettingsStore(
334+
FALLBACK_ON_CODER_FOR_SIGNATURES to "allow",
335+
DATA_DIRECTORY to tmpdir.resolve("overwrite-cli").toString(),
336+
),
337+
Environment(),
338+
context.logger
338339
)
339340
),
340341
url

0 commit comments

Comments
 (0)