Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Feb 6, 2025
1 parent ff123fe commit 82b3039
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/teksturepako/pakku/Version.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package teksturepako.pakku

const val VERSION = "0.25.0"
const val VERSION = "0.26.0"
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package teksturepako.pakku.api.export

import com.github.michaelbull.result.get
import kotlinx.coroutines.runBlocking
import strikt.api.expectThat
import strikt.assertions.contains
Expand Down Expand Up @@ -63,7 +64,7 @@ class CfModpackModelTest : PakkuTest()
name = modpackName
)

val platforms = lockFile.getPlatforms().getOrNull()
val platforms = lockFile.getPlatforms().get()

assertNotNull(platforms)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package teksturepako.pakku.api.export

import com.github.michaelbull.result.get
import kotlinx.coroutines.runBlocking
import strikt.api.expectThat
import strikt.assertions.contains
Expand Down Expand Up @@ -69,7 +70,7 @@ class MrModpackModelTest : PakkuTest()
name = modpackName
)

private val platforms = lockFile.getPlatforms().getOrNull()
private val platforms = lockFile.getPlatforms().get()

override suspend fun `set-up`()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@ package teksturepako.pakku.cli.cmd

import com.github.ajalt.clikt.testing.test
import kotlinx.coroutines.runBlocking
import strikt.api.expectThat
import strikt.assertions.contains
import teksturepako.pakku.PakkuTest
import teksturepako.pakku.api.actions.errors.FileNotFound
import teksturepako.pakku.api.data.ConfigFile
import teksturepako.pakku.api.data.LockFile
import teksturepako.pakku.api.data.workingPath
import teksturepako.pakku.api.projects.Project
import teksturepako.pakku.api.projects.ProjectSide
import teksturepako.pakku.api.projects.ProjectType
import teksturepako.pakku.api.projects.UpdateStrategy
import kotlin.io.path.Path
import kotlin.io.path.pathString
import kotlin.test.Test
import kotlin.test.assertContains
import kotlin.test.assertEquals
import kotlin.test.assertNotNull

Expand All @@ -23,7 +27,8 @@ class CfgPrjTest : PakkuTest()
val cmd = CfgPrj()
val output = cmd.test("test --subpath test-subpath").output

assertContains(output, "Could not read '$workingPath/${LockFile.FILE_NAME}'")
expectThat(output)
.contains(FileNotFound(Path(workingPath, LockFile.FILE_NAME).pathString).rawMessage)
}

@Test
Expand Down

0 comments on commit 82b3039

Please sign in to comment.