Skip to content

Commit 61fb582

Browse files
authored
Supply explicit passwords for encrypted Lambda test fixtures (#194)
1 parent 68fc849 commit 61fb582

14 files changed

Lines changed: 28 additions & 0 deletions

‎src/test/java/com/networknt/aws/lambda/admin/CacheExplorerHandlerTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import com.networknt.aws.lambda.handler.Handler;
1111
import com.networknt.aws.lambda.handler.chain.Chain;
1212
import org.junit.jupiter.api.Test;
13+
import org.junit.jupiter.api.util.SetSystemProperty;
1314

15+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
1416
public class CacheExplorerHandlerTest {
1517
@Test
1618
public void testGetCacheJwk() {

‎src/test/java/com/networknt/aws/lambda/admin/HealthCheckHandlerTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import com.networknt.aws.lambda.LightLambdaExchange;
1111
import com.networknt.aws.lambda.app.LambdaApp;
1212
import org.junit.jupiter.api.Test;
13+
import org.junit.jupiter.api.util.SetSystemProperty;
1314

15+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
1416
class HealthCheckHandlerTest {
1517
@Test
1618
void testHealthCheck() {

‎src/test/java/com/networknt/aws/lambda/admin/LoggerHandlerTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import com.networknt.aws.lambda.LightLambdaExchange;
1111
import com.networknt.aws.lambda.app.LambdaApp;
1212
import org.junit.jupiter.api.Test;
13+
import org.junit.jupiter.api.util.SetSystemProperty;
1314

15+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
1416
public class LoggerHandlerTest {
1517
@Test
1618
void testGetLogger() {

‎src/test/java/com/networknt/aws/lambda/admin/ServerInfoHandlerTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import com.networknt.aws.lambda.LightLambdaExchange;
1111
import com.networknt.aws.lambda.app.LambdaApp;
1212
import org.junit.jupiter.api.Test;
13+
import org.junit.jupiter.api.util.SetSystemProperty;
1314

15+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
1416
public class ServerInfoHandlerTest {
1517
@Test
1618
public void testServerInfo() {

‎src/test/java/com/networknt/aws/lambda/handler/HandlerTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
import org.junit.jupiter.api.Assertions;
55
import org.junit.jupiter.api.Test;
6+
import org.junit.jupiter.api.util.SetSystemProperty;
67

8+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
79
public class HandlerTest {
810
@Test
911
public void testInitHandler() {

‎src/test/java/com/networknt/aws/lambda/middleware/audit/AuditMiddlewareTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
import com.networknt.aws.lambda.utility.HeaderKey;
1010
import org.junit.jupiter.api.Assertions;
1111
import org.junit.jupiter.api.Test;
12+
import org.junit.jupiter.api.util.SetSystemProperty;
1213

14+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
1315
public class AuditMiddlewareTest {
1416
@Test
1517
public void testAuditMiddleware() {

‎src/test/java/com/networknt/aws/lambda/middleware/cors/CorsMiddlewareTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
import com.networknt.cors.CorsConfig;
1515
import org.junit.jupiter.api.Assertions;
1616
import org.junit.jupiter.api.Test;
17+
import org.junit.jupiter.api.util.SetSystemProperty;
1718
import org.slf4j.Logger;
1819
import org.slf4j.LoggerFactory;
1920

2021
import java.util.Map;
2122

2223
import static com.networknt.cors.CorsHeaders.ORIGIN;
2324

25+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
2426
public class CorsMiddlewareTest {
2527
private static final Logger LOG = LoggerFactory.getLogger(CorsMiddlewareTest.class);
2628

‎src/test/java/com/networknt/aws/lambda/middleware/header/ResponseHeaderMiddlewareTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import com.networknt.utility.MapUtil;
1111
import org.junit.jupiter.api.Assertions;
1212
import org.junit.jupiter.api.Test;
13+
import org.junit.jupiter.api.util.SetSystemProperty;
1314

15+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
1416
public class ResponseHeaderMiddlewareTest {
1517
@Test
1618
void testResponseHeaderRemoveUpdate() {

‎src/test/java/com/networknt/aws/lambda/middleware/metrics/APMMetricsMiddlewareTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
import com.networknt.aws.lambda.utility.HeaderKey;
1010
import org.junit.jupiter.api.Assertions;
1111
import org.junit.jupiter.api.Test;
12+
import org.junit.jupiter.api.util.SetSystemProperty;
1213

14+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
1315
public class APMMetricsMiddlewareTest {
1416
@Test
1517
public void testAPMMetricsMiddleware() {

‎src/test/java/com/networknt/aws/lambda/middleware/security/ApiKeyMiddlewareTest.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
import com.networknt.status.Status;
1111
import org.junit.jupiter.api.Assertions;
1212
import org.junit.jupiter.api.Test;
13+
import org.junit.jupiter.api.util.SetSystemProperty;
1314

15+
@SetSystemProperty(key = "light_4j_config_password", value = "light")
1416
public class ApiKeyMiddlewareTest {
1517
/**
1618
* Test with a path that is in the apikey pathPrefixAuths definition. We are expecting return OK.

0 commit comments

Comments
 (0)