-
Notifications
You must be signed in to change notification settings - Fork 368
Update the logging properties to opt-out of the prefix events #844 #845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8b68f75
Update the logging properties to opt-out of the prefix events #844
mickeyz07 d3f2a2f
Update the logging properties to opt-out of the prefix events, second…
mickeyz07 6d8f307
Update the logging properties to opt-out of the prefix events, third …
mickeyz07 7822d6f
Update the logging properties to opt-out of the prefix events #844 fo…
mickeyz07 2e2d0e5
Update the logging properties to opt-out of the prefix events #844 fi…
mickeyz07 9ca8473
Merge branch 'ESAPI:develop' into issue-844
mickeyz07 c9d5b78
Update the logging properties to opt-out of the prefix events #844 si…
mickeyz07 54a7463
Update the logging properties to opt-out of the prefix events #844 se…
mickeyz07 17219b7
Update the logging properties to opt-out of the prefix events ESAPI#8…
mickeyz07 0e9bb76
Update the logging properties to opt-out of the prefix events ESAPI#8…
mickeyz07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
45 changes: 45 additions & 0 deletions
45
src/test/java/org/owasp/esapi/logging/appender/EventTypeLogSupplierIgnoreEventTypeTest.java
This file contains hidden or 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,45 @@ | ||
package org.owasp.esapi.logging.appender; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import org.owasp.esapi.Logger; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
@RunWith(Parameterized.class) | ||
public class EventTypeLogSupplierIgnoreEventTypeTest { | ||
|
||
@Parameterized.Parameters (name="{0} -> {1}") | ||
public static Collection<Object[]> assembleTests() { | ||
List<Object[]> paramSets = new ArrayList<>(); | ||
paramSets.add(new Object[] {Logger.EVENT_FAILURE,""}); | ||
paramSets.add(new Object[] {Logger.EVENT_SUCCESS,""}); | ||
paramSets.add(new Object[] {Logger.EVENT_UNSPECIFIED,""}); | ||
paramSets.add(new Object[] {Logger.SECURITY_AUDIT,""}); | ||
paramSets.add(new Object[] {Logger.SECURITY_FAILURE,""}); | ||
paramSets.add(new Object[] {Logger.SECURITY_SUCCESS,""}); | ||
paramSets.add(new Object[] {null, ""}); | ||
|
||
return paramSets; | ||
} | ||
|
||
private final Logger.EventType eventType; | ||
private final String expectedResult; | ||
|
||
public EventTypeLogSupplierIgnoreEventTypeTest(Logger.EventType eventType, String result) { | ||
this.eventType = eventType; | ||
this.expectedResult = result; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Add blank line here for improved readability. |
||
|
||
@Test | ||
public void testEventTypeLogIgnoreEventType() { | ||
EventTypeLogSupplier supplier = new EventTypeLogSupplier(eventType); | ||
supplier.setLogEventType(false); | ||
assertEquals(expectedResult, supplier.get()); | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.