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 58d84bc
Show file tree
Hide file tree
Showing 2 changed files with 14 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
13 changes: 13 additions & 0 deletions test_runner/src/test/kotlin/ftl/util/UtilsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ class UtilsTest {
assertThat(Utils.readTextResource("version.txt")).isNotNull()
}

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

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

0 comments on commit 58d84bc

Please sign in to comment.