Skip to content

Commit

Permalink
fix storage sample test
Browse files Browse the repository at this point in the history
This uses the same approach as of data-firestore: we will not rely on autowired constructors
  • Loading branch information
diegomarquezp committed Dec 23, 2024
1 parent c386669 commit dd81242
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ public class GcsSpringIntegrationTestConfiguration {

private String uniqueDirectory;

public GcsSpringIntegrationTestConfiguration(
@Value("${gcs-local-directory}") String localDirectory) {
uniqueDirectory = String.format("%s-%s", localDirectory, UUID.randomUUID());
}
@Value("${gcs-local-directory}")
String localDirectory;

@Bean("localDirectoryName")
public String uniqueDirectory() {
if (uniqueDirectory == null) {
uniqueDirectory = String.format("%s-%s", localDirectory, UUID.randomUUID());
}
return uniqueDirectory;
}
}

0 comments on commit dd81242

Please sign in to comment.