-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added configuration to enable/disable verbose error messages
- Loading branch information
Showing
7 changed files
with
98 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version=0.91.10 | ||
version=0.91.11 | ||
springVersion=4.3.3.RELEASE | ||
springBootVersion=1.4.1.RELEASE | ||
jerseyVersion=2.24 | ||
|
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
49 changes: 49 additions & 0 deletions
49
...ception-mapper/src/test/java/app/error/com/aol/micro/server/ErrorNoDetailsRunnerTest.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,49 @@ | ||
|
||
package app.error.com.aol.micro.server; | ||
|
||
import com.aol.micro.server.MicroserverApp; | ||
import com.aol.micro.server.config.Microserver; | ||
import com.aol.micro.server.module.ConfigurableModule; | ||
import com.aol.micro.server.testing.RestAgent; | ||
import org.glassfish.jersey.media.multipart.MultiPartFeature; | ||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import javax.ws.rs.core.Response; | ||
import java.util.Arrays; | ||
|
||
import static org.hamcrest.CoreMatchers.containsString; | ||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.junit.Assert.assertThat; | ||
|
||
@Microserver(properties = {"micro.general.exception.mapper.details", "false"}) | ||
public class ErrorNoDetailsRunnerTest { | ||
|
||
RestAgent rest = new RestAgent(); | ||
|
||
MicroserverApp server; | ||
@Before | ||
public void startServer(){ | ||
server = new MicroserverApp(ConfigurableModule | ||
.builder() | ||
.context("simple-app") | ||
.defaultResources(Arrays.asList(MultiPartFeature.class)) | ||
.build()); | ||
|
||
server.start(); | ||
|
||
} | ||
|
||
@After | ||
public void stopServer(){ | ||
server.stop(); | ||
} | ||
|
||
@Test | ||
public void runAppAndBasicTest(){ | ||
Response response = rest.get("http://localhost:8080/simple-app/status/ping"); | ||
assertThat(response.getStatus(),is(400)); | ||
assertThat(response.readEntity(String.class), containsString("{\"errorCode\":\"INTERNAL_SERVER_ERROR\",\"message\":")); | ||
} | ||
} |
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