From 6dba7f1be2e6beedc89e29ef3ba97fddadc47504 Mon Sep 17 00:00:00 2001 From: Lee kangmin Date: Thu, 29 Aug 2024 11:22:28 +0900 Subject: [PATCH] =?UTF-8?q?[#54]=20env=20=EA=B4=80=EB=A0=A8=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + src/test/java/com/speech/up/UpApplicationTests.java | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d284fd1..d784b47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.env /build/ /src/main/resources/.env +/src/main/resources/logback-spring.xml \ No newline at end of file diff --git a/src/test/java/com/speech/up/UpApplicationTests.java b/src/test/java/com/speech/up/UpApplicationTests.java index e5473b6..c10603d 100644 --- a/src/test/java/com/speech/up/UpApplicationTests.java +++ b/src/test/java/com/speech/up/UpApplicationTests.java @@ -32,14 +32,13 @@ void setUp() { @DisplayName("환경 변수가 로드되었는지 테스트") void testEnvironmentVariablesLoaded() { // given - when(dotenvMock.get("JWT_SECRET_KEY")).thenReturn("secret"); + when( dotenvMock.get("is_not_exist")).thenReturn("secret"); // when UpApplication.main(new String[] {}); // then - assertEquals("secret", dotenvMock.get("JWT_SECRET_KEY")); - assertNotNull(upApplication,System.getenv("JWT_SECRET_KEY")); + assertEquals(dotenvMock.get("is_not_exist"), "secret"); } @Test