-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* a bunch of config property stuff * checks for env-var only config * fix missing test :facepalm * CR feedback to use preconditions to check args
- Loading branch information
1 parent
eacef4b
commit c1bbe8b
Showing
12 changed files
with
140 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
java/core/src/test/java/co/worklytics/psoxy/gateway/ProxyConfigPropertyTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package co.worklytics.psoxy.gateway; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.ValueSource; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class ProxyConfigPropertyTest { | ||
|
||
|
||
|
||
@ValueSource( | ||
strings = { | ||
"PSOXY_ENCRYPTION_KEY", | ||
"ENCRYPTION_KEY_IP", | ||
"RULES", | ||
"PSOXY_SALT", | ||
"SALT_IP", | ||
} | ||
) | ||
@ParameterizedTest | ||
public void remoteConfigVars(String paramName) { | ||
ProxyConfigProperty property = ProxyConfigProperty.valueOf(paramName); | ||
assertNotNull(property); | ||
assertFalse(property.isEnvVarOnly()); | ||
} | ||
|
||
@ValueSource( | ||
strings = { | ||
"CUSTOM_RULES_SHA", | ||
"EMAIL_CANONICALIZATION", | ||
"PATH_TO_SHARED_CONFIG", | ||
"PATH_TO_INSTANCE_CONFIG", | ||
"IDENTIFIER_SCOPE_ID", | ||
} | ||
) | ||
@ParameterizedTest | ||
public void envOnlyConfigVars(String paramName) { | ||
ProxyConfigProperty property = ProxyConfigProperty.valueOf(paramName); | ||
assertNotNull(property); | ||
assertTrue(property.isEnvVarOnly()); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters