Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nox-platform/backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ dependencies {
runtimeOnly("org.postgresql:postgresql")
annotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("io.jsonwebtoken:jjwt-api:0.11.5")
Expand Down
24 changes: 24 additions & 0 deletions nox-platform/backend/check_yaml_duplicates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import yaml
import sys

class UniqueKeyLoader(yaml.SafeLoader):
def construct_mapping(self, node, deep=False):
mapping = []
for key_node, value_node in node.value:
key = self.construct_object(key_node, deep=deep)
if key in [m[0] for m in mapping]:
print(f"Duplicate key found: {key}")
mapping.append((key, self.construct_object(value_node, deep=deep)))
return super().construct_mapping(node, deep)

def check_yaml(filepath):
print(f"Checking {filepath}...")
try:
with open(filepath, 'r') as f:
yaml.load(f, Loader=UniqueKeyLoader)
except Exception as e:
print(f"Error parsing {filepath}: {e}")

if __name__ == "__main__":
for arg in sys.argv[1:]:
check_yaml(arg)
26 changes: 26 additions & 0 deletions nox-platform/backend/src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,29 @@ spring:
mail:
host: localhost
port: 1025
username: test@test.com
password: test
properties:
mail:
smtp:
auth: true
starttls:
enable: true
protocol: smtp
datasource:
url: jdbc:h2:mem:testdb
driver-class-name: org.h2.Driver
username: sa
password: ""
jpa:
hibernate:
ddl-auto: create-drop
properties:
hibernate:
dialect: org.hibernate.dialect.H2Dialect
flyway:
enabled: false

app:
frontend:
url: http://localhost:3000
6 changes: 1 addition & 5 deletions nox-platform/backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ server:
spring:
application:
name: nox-platform
mail:
host: ${MAIL_HOST:localhost}
port: ${MAIL_PORT:1025}
username: ${MAIL_USERNAME:}
password: ${MAIL_PASSWORD:}

datasource:
url: jdbc:postgresql://localhost:5432/nox_core
username: nox
Expand Down

This file was deleted.

27 changes: 27 additions & 0 deletions nox-platform/backend/src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spring:
cache:
type: simple
mail:
host: localhost
port: 1025
username: test@test.com
password: test
properties:
mail:
smtp:
auth: true
starttls:
enable: true
protocol: smtp
datasource:
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.PostgreSQLDialect
flyway:
enabled: true

app:
frontend:
url: http://localhost:3000
Loading