Skip to content

Commit

Permalink
Remove .env file generated during tests
Browse files Browse the repository at this point in the history
One unit tests from the TLS CLI is generating a .env file during its execution. This commit removes the file after the execution of the test.
  • Loading branch information
cescoffier committed Jul 18, 2024
1 parent 1f69d1d commit 5d5844c
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@
import java.io.FileInputStream;
import java.security.KeyStore;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class SelfSignedGenerationTest {

@AfterAll
static void cleanup() {
// File generated during the generation.
File file = new File(".env");
if (file.isFile()) {
file.delete();
}
}

@Test
public void testSelfSignedGeneration() throws Exception {
GenerateCertificateCommand command = new GenerateCertificateCommand();
Expand Down

0 comments on commit 5d5844c

Please sign in to comment.