Skip to content

Commit

Permalink
Issue #484: Name with ':' breaks in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunil committed Feb 1, 2019
1 parent 5831773 commit bfa5f0a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test_runner/src/main/kotlin/ftl/util/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ object Utils {
val instant = Instant.now()

bucketName.append(
DateTimeFormatter.ofPattern("yyyy-MM-dd_HH:mm:ss.")
DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss.")
.withZone(ZoneOffset.UTC)
.format(instant)
)
Expand Down
14 changes: 14 additions & 0 deletions test_runner/src/test/kotlin/ftl/util/UtilsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ftl.json.SavedMatrix
import ftl.json.SavedMatrixTest.Companion.createResultsStorage
import ftl.json.SavedMatrixTest.Companion.createStepExecution
import ftl.test.util.FlankTestRunner
import junit.framework.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

Expand All @@ -23,6 +24,19 @@ class UtilsTest {
assertThat(Utils.readTextResource("version.txt")).isNotNull()
}

@Test
fun uniqueObjectName_verifyPattern() {
val randomName = Utils.uniqueObjectName()
assertEquals(32, randomName.length)
assertEquals('-', randomName[4])
assertEquals('-', randomName[7])
assertEquals('_', randomName[10])
assertEquals('-', randomName[13])
assertEquals('-', randomName[16])
assertEquals('.', randomName[19])
assertEquals('_', randomName[26])
}

@Test
fun testExitCodeForFailed() {
val testExecutions = listOf(
Expand Down

0 comments on commit bfa5f0a

Please sign in to comment.