Skip to content

Commit

Permalink
Make sample data transparent in test setup
Browse files Browse the repository at this point in the history
This makes it easier to modify sample data to work well for tests as needed
  • Loading branch information
fwilhe committed May 10, 2024
1 parent b29d6a8 commit 9b9e89b
Show file tree
Hide file tree
Showing 3 changed files with 378 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@Testcontainers
class GlvdApplicationTests {

static DockerImageName glvdPostgresImage = DockerImageName.parse("ghcr.io/gardenlinux/glvd-postgres:edgesampledata")
static DockerImageName glvdPostgresImage = DockerImageName.parse("ghcr.io/gardenlinux/glvd-postgres:edgenotls")
.asCompatibleSubstituteFor("postgres");

@Container
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/gardenlinux/glvd/GlvdControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
@ExtendWith({RestDocumentationExtension.class, SpringExtension.class})
class GlvdControllerTest {

static DockerImageName glvdPostgresImage = DockerImageName.parse("ghcr.io/gardenlinux/glvd-postgres:edgesampledata")
static DockerImageName glvdPostgresImage = DockerImageName.parse("ghcr.io/gardenlinux/glvd-postgres:edgenotls")
.asCompatibleSubstituteFor("postgres");

@Container
@ServiceConnection
static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>(glvdPostgresImage).withDatabaseName("glvd")
.withUsername("glvd").withPassword("glvd");
.withUsername("glvd").withPassword("glvd").withInitScript("schema-with-sample-data.sql");

@Autowired
CveRepository cveRepository;
Expand Down
Loading

0 comments on commit 9b9e89b

Please sign in to comment.