Skip to content

Commit

Permalink
Merge pull request #9541 from murdos/remove-useless-test-application-…
Browse files Browse the repository at this point in the history
…properties

chore: remove useless application.properties test resources
  • Loading branch information
murdos committed Apr 15, 2024
2 parents 2ad6bf9 + d5071b8 commit dcecb33
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void shouldBuildModule() {

JHipsterModule module = factory.buildModule(properties);

assertThatModuleWithFiles(module, sampleInMemoryRepository(), inMemoryBeersResetter(), customPropertiesFile())
assertThatModuleWithFiles(module, sampleInMemoryRepository(), inMemoryBeersResetter())
.hasPrefixedFiles(
"src/main/java/com/jhipster/test/sample/infrastructure/secondary",
"BeerCatalogTable.java",
Expand Down Expand Up @@ -58,10 +58,6 @@ void shouldBuildModule() {
);
}

private ModuleFile customPropertiesFile() {
return file("src/test/resources/projects/cassandra/application.properties", "src/main/resources/config/application.properties");
}

private ModuleFile sampleInMemoryRepository() {
return file(
"src/test/resources/projects/sample-feature/InMemoryBeersRepository.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ void shouldHandleCommitErrors() {
@Test
void shouldCommitAllFiles() throws IOException {
Path path = gitInit();
Files.copy(Paths.get("src/test/resources/projects/files/application.properties"), path.resolve("application.properties"));
Files.copy(Paths.get("src/test/resources/projects/files/dummy.txt"), path.resolve("dummy.txt"));

git.commitAll(new JHipsterProjectFolder(path.toString()), "Add application.properties");
git.commitAll(new JHipsterProjectFolder(path.toString()), "Add dummy.txt");

assertThat(GitTestUtil.getCommits(path)).contains("Add application.properties");
assertThat(GitTestUtil.getCommits(path)).contains("Add dummy.txt");
assertThat(GitTestUtil.getCurrentBranch(path)).contains("main");
}
}
Expand Down
16 changes: 0 additions & 16 deletions src/test/resources/projects/cassandra/application.properties

This file was deleted.

10 changes: 0 additions & 10 deletions src/test/resources/projects/files/application.properties

This file was deleted.

0 comments on commit dcecb33

Please sign in to comment.