Skip to content

Commit

Permalink
Fix tmp dir location in test
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Sep 20, 2024
1 parent 4be7704 commit c9c17dd
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.nio.file.Paths;

/**
* Test {@link JDBCConfigBackendConfigurer} through {@link JDBCConfigAutoConfiguration} when {@code
* geoserver.backend.jdbcconfig.enabled=true}
Expand All @@ -49,8 +51,9 @@ void testProperties() {
assertNotNull(configProperties);
assertNotNull(configProperties.getDatasource());
assertNotNull(configProperties.getCacheDirectory());
assertEquals(
"/tmp/geoserver-jdbcconfig-cache", configProperties.getCacheDirectory().toString());
var tmp = Paths.get(System.getProperty("java.io.tmpdir"));
var expected = tmp.resolve("geoserver-jdbcconfig-cache");
assertEquals(expected.toString(), configProperties.getCacheDirectory().toString());
}

@Test
Expand Down

0 comments on commit c9c17dd

Please sign in to comment.