Skip to content

Commit

Permalink
test(backup/gcs): verify that '/' is a valid basePath
Browse files Browse the repository at this point in the history
(cherry picked from commit 6de3155)
  • Loading branch information
lenaschoenburg committed Apr 4, 2023
1 parent 54c3a4b commit f0757e5
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ void shouldRejectEmptyBucketName() {
.hasMessageContaining("bucketName");
}

@Test
void shouldAcceptSingleSlashAsBasePath() {
// given
final var bucketName = "test";
final var basePath = "/";

// when
final var config =
new GcsBackupConfig.Builder().withBucketName(bucketName).withBasePath(basePath).build();

// then
Assertions.assertThat(config.basePath()).isNull();
}

@Test
void shouldRemoveLeadingSlashesFromBasePath() {
// given
Expand Down

0 comments on commit f0757e5

Please sign in to comment.