Skip to content

Commit

Permalink
#143 : Upgrade to latest H2
Browse files Browse the repository at this point in the history
REST API tests failing due to circular dependency in WebSecurityConfig - next on the list!
  • Loading branch information
gazbert committed Feb 19, 2022
1 parent caaa3d6 commit 18222ea
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 37 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ext.libraries = [
jjwt : dependencies.create("io.jsonwebtoken:jjwt:0.9.1"),
google_guava : dependencies.create("com.google.guava:guava:31.0.1-jre"),
google_gson : dependencies.create("com.google.code.gson:gson:2.8.9"),
h2 : dependencies.create("com.h2database:h2:1.4.200"),
h2 : dependencies.create("com.h2database:h2:2.1.210"),
javax_mail_api : dependencies.create("javax.mail:javax.mail-api:" + ext.versions.javaxMailVersion),
javax_mail_sun : dependencies.create("com.sun.mail:javax.mail:" + ext.versions.javaxMailVersion),
javax_xml_api : dependencies.create("javax.xml.bind:jaxb-api:" + ext.versions.jaxbVersion),
Expand Down
1 change: 1 addition & 0 deletions bxbot-rest-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* @author gazbert
*/
@Entity
@Table(name = "USER")
@Table(name = "BXBOT_USER")
public class User {

@Id
Expand Down
3 changes: 2 additions & 1 deletion bxbot-rest-api/src/main/resources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ $$ | $$ |$$ /\$$\ $$ | $$ |$$ | $$ | $$ |$$\
$$$$$$$ |$$ / $$ | $$$$$$$ |\$$$$$$ | \$$$$ |
\_______/ \__| \__| \_______/ \______/ \____/

:: Spring Boot :: (v2.6.2)
Spring Boot : ${spring-boot.version}
BX-bot : ${application.version}
4 changes: 2 additions & 2 deletions bxbot-rest-api/src/main/resources/import.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
--
-- DO NOT use online bcrypt password generators unless you want to risk having your passwords harvested!
--
INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, EMAIL, ENABLED, LASTPASSWORDRESETDATE) VALUES (1, 'admin', '$2a$08$lDnHPz7eUkSi6ao14Twuau08mzhWrL4kyZGGU5xfiGALO/Vxd5DOi', 'admin', 'admin', '[email protected]', 1, PARSEDATETIME('01-01-2016', 'dd-MM-yyyy'));
INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, EMAIL, ENABLED, LASTPASSWORDRESETDATE) VALUES (2, 'user', '$2a$06$Ut3LoKEuuhVBJObJA.nw.OwD8CcacRachaFIUU0TcI3vghz4MZS9K', 'user', 'user', '[email protected]', 1, PARSEDATETIME('01-01-2016','dd-MM-yyyy'));
INSERT INTO BXBOT_USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, EMAIL, ENABLED, LASTPASSWORDRESETDATE) VALUES (1, 'admin', '$2a$08$lDnHPz7eUkSi6ao14Twuau08mzhWrL4kyZGGU5xfiGALO/Vxd5DOi', 'admin', 'admin', '[email protected]', 1, PARSEDATETIME('01-01-2016', 'dd-MM-yyyy'));
INSERT INTO BXBOT_USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, EMAIL, ENABLED, LASTPASSWORDRESETDATE) VALUES (2, 'user', '$2a$06$Ut3LoKEuuhVBJObJA.nw.OwD8CcacRachaFIUU0TcI3vghz4MZS9K', 'user', 'user', '[email protected]', 1, PARSEDATETIME('01-01-2016','dd-MM-yyyy'));

INSERT INTO ROLE (ID, NAME) VALUES (1, 'ROLE_USER');
INSERT INTO ROLE (ID, NAME) VALUES (2, 'ROLE_ADMIN');
Expand Down
5 changes: 3 additions & 2 deletions bxbot-rest-api/src/test/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ bxbot.restapi.maxLogfileLines=2
# If the size of the logfile exceeds this limit, the end of the file will be truncated before download.
bxbot.restapi.maxLogfileDownloadSize=100

# FIXME: Circ Dep error being thrown during REST API tests from WebSecurityConfig since upgrade to Boot 2.6...
spring.main.allow-circular-references=true
`# H2 debugging
#spring.jpa.properties.hibernate.show_sql=true
#spring.jpa.properties.hibernate.format_sql=true
21 changes: 0 additions & 21 deletions bxbot-rest-api/src/test/resources/import.sql

This file was deleted.

4 changes: 2 additions & 2 deletions bxbot-rest-api/src/test/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
</Appenders>
<Loggers>
<!-- debug | info | warn | error | fatal -->
<Root level="warn">
<!--<AppenderRef ref="STDOUT"/>-->
<Root level="info">
<AppenderRef ref="STDOUT"/>
<!--<AppenderRef ref="BXBot_RollingFile"/>-->
</Root>
</Loggers>
Expand Down
6 changes: 0 additions & 6 deletions config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ bxbot.restapi.maxLogfileLines=1000
# If the size of the logfile exceeds this limit, the end of the file will be truncated before download.
bxbot.restapi.maxLogfileDownloadSize=1048576

# Root context for serving Swagger API docs JSON endpoint.
# See: https://springfox.github.io/springfox/docs/snapshot/#customizing-the-swagger-endpoints
# E.g. if set to /api-docs you would access Swagger docs using: http://localhost:8080/api-docs
# NOTE: The Swagger UI is always served at: http://localhost:8080/swagger-ui.html
springfox.documentation.swagger.v2.path=/api-docs

###############################################################################
# TLS Configuration (for securing REST API in Production)
###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
<version>2.1.210</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
Expand Down

0 comments on commit 18222ea

Please sign in to comment.