Skip to content

Commit

Permalink
Merge branch 'master' into 1313-add-it-test-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
adamfilipow92 authored Nov 16, 2020
2 parents 5dc518a + 9ac7371 commit 138be3c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion flank-scripts/bash/buildFlankScripts.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ SET DIR=%~dp0
SET FLANK_SCRIPTS=%DIR%\..
SET GRADLE_EXECUTABLE_PATH=%FLANK_SCRIPTS%\..

%GRADLE_EXECUTABLE_PATH%\gradlew.bat flank-scripts:clean flank-scripts:assemble flank-scripts:shadowJar
CALL %GRADLE_EXECUTABLE_PATH%\gradlew.bat flank-scripts:clean flank-scripts:assemble flank-scripts:shadowJar
copy %FLANK_SCRIPTS%\build\libs\flankScripts.jar %DIR%\flankScripts.jar
8 changes: 4 additions & 4 deletions flank-scripts/bash/flankScripts.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SET DIR=%~dp0
SET scriptsJar=%DIR%\flankScripts.jar
SET scriptsJar=%DIR%flankScripts.jar

if not exist "%scriptsJar%" {
%DIR%\buildFlankScripts.bat
}
if not exist %scriptsJar% (
CALL %DIR%\buildFlankScripts.bat
)

java -jar "%scriptsJar%" %*
4 changes: 3 additions & 1 deletion test_runner/src/main/kotlin/ftl/gc/UserAuth.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class UserAuth {
fun load(): UserCredentials = readCredentialsOrThrow()

private fun readCredentialsOrThrow(): UserCredentials = runCatching {
ObjectInputStream(FileInputStream(userToken.toFile())).readObject() as UserCredentials
FileInputStream(userToken.toFile()).use {
ObjectInputStream(it).readObject() as UserCredentials
}
}.getOrElse {
throwAuthenticationError()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ftl.run.status

import ftl.config.FtlConstants.isWindows
import ftl.run.status.PrinterTestUtil.changes1
import ftl.run.status.PrinterTestUtil.changes2
import io.mockk.every
Expand All @@ -8,6 +9,7 @@ import io.mockk.verify
import org.fusesource.jansi.Ansi
import org.fusesource.jansi.AnsiConsole
import org.junit.Assert.assertEquals
import org.junit.Assume.assumeFalse
import org.junit.Rule
import org.junit.Test
import org.junit.contrib.java.lang.system.SystemOutRule
Expand All @@ -19,6 +21,7 @@ class MultiLinePrinterTest {

@Test
fun test() {
assumeFalse(isWindows)
// given
val ansi = spyk(Ansi.ansi()) { every { this@spyk.toString() } returns "" }
val printChanges = MultiLinePrinter { ansi }
Expand Down

0 comments on commit 138be3c

Please sign in to comment.