From c484f846a2cc75282754c66f3bbeee97932cf70b Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 4 Oct 2023 12:52:18 +0200 Subject: [PATCH] fix: tests --- src/test/kotlin/io/snyk/plugin/cli/PlatformTest.kt | 1 + .../plugin/services/download/CliDownloaderServiceIntegTest.kt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/test/kotlin/io/snyk/plugin/cli/PlatformTest.kt b/src/test/kotlin/io/snyk/plugin/cli/PlatformTest.kt index b7b18a065..4a89c50c3 100644 --- a/src/test/kotlin/io/snyk/plugin/cli/PlatformTest.kt +++ b/src/test/kotlin/io/snyk/plugin/cli/PlatformTest.kt @@ -36,6 +36,7 @@ class PlatformTest { fun testDetectPlatformException() { val properties = Properties() properties["os.name"] = "Not supported CPU type" + properties["os.arch"] = "dont care" Platform.detect(properties) } diff --git a/src/test/kotlin/io/snyk/plugin/services/download/CliDownloaderServiceIntegTest.kt b/src/test/kotlin/io/snyk/plugin/services/download/CliDownloaderServiceIntegTest.kt index 558cb5f98..2c85eb83b 100644 --- a/src/test/kotlin/io/snyk/plugin/services/download/CliDownloaderServiceIntegTest.kt +++ b/src/test/kotlin/io/snyk/plugin/services/download/CliDownloaderServiceIntegTest.kt @@ -98,6 +98,8 @@ class CliDownloaderServiceIntegTest : LightPlatformTestCase() { every { downloader.calculateSha256(any()) } returns "wrong-sha" justRun { errorHandler.handleChecksumVerificationException(any(), any(), any()) } + // this is needed, but I don't know why the config is not picked up from setUp() + every { pluginSettings() } returns SnykApplicationSettingsStateService() cutSpy.downloadLatestRelease(indicator, project)