Skip to content

Commit

Permalink
Dependabot/maven/org.apache.maven.plugins maven surefire plugin 2.22.2 (
Browse files Browse the repository at this point in the history
#14)

* Bump maven-surefire-plugin from 2.19.1 to 2.22.2

Bumps [maven-surefire-plugin](https://github.com/apache/maven-surefire) from 2.19.1 to 2.22.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-2.19.1...surefire-2.22.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* need to fix mongo tests

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paul McCann <[email protected]>
Co-authored-by: Paul <[email protected]>
  • Loading branch information
4 people authored Dec 2, 2024
1 parent f3bf713 commit 526e846
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<version>2.22.2</version>
<configuration>
<skipTests>${skipUTs}</skipTests>
<excludes>
Expand Down
43 changes: 42 additions & 1 deletion src/it/java/servlets/SetupIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void testNoMysqlResource() {
fail(message);
}

if (authData == "") {
if (authData.equals("")) {
String message = "Auth data loaded from " + Constants.SETUP_AUTH + " was empty!";
log.fatal(message);
fail(message);
Expand Down Expand Up @@ -173,4 +173,45 @@ public void testNoMysqlResource() {
*/

}
@Ignore
@Test
public void testNoMongodbResource() {

log.debug("Creating Setup Servlet Instance");
Setup servlet = new Setup();
try {
servlet.init(new MockServletConfig("Setup"));
} catch (ServletException e) {
log.fatal(e.toString());
fail(e.toString());
}

TestProperties.deleteMongoResource();
assertTrue(Setup.isInstalled());

String mongodbProp = "";
try {
mongodbProp = FileUtils.readFileToString(new File(Constants.MONGO_DB_PROP), StandardCharsets.UTF_8);
} catch (IOException e) {
String message =
"Error when loading mongodb file "
+ Constants.MONGO_DB_PROP
+ ". Exception message was "
+ e.toString();
log.fatal(message);
fail(message);
}

if (mongodbProp == null) {
String message = "MongoDb data loaded from " + Constants.MONGO_DB_PROP + " was null!";
log.fatal(message);
fail(message);
}

if (mongodbProp.equals("")) {
String message = "MongoDb data loaded from " + Constants.MONGO_DB_PROP + " was empty!";
log.fatal(message);
fail(message);
}
}
}

0 comments on commit 526e846

Please sign in to comment.