Skip to content

Commit e6a2a37

Browse files
committed
Implement new tests
Signed-off-by: Daniel Werner <daniel.werner@ise.fraunhofer.de>
1 parent 2686fe0 commit e6a2a37

27 files changed

+941
-229
lines changed

conformance-tests/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
testResults/
2+
build
3+
.gradle/
4+
.idea/
5+
allure-results/
6+
.venv/
7+
testtool-out/
Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
{
22
"allowedLicenses": [
33
{
4-
"moduleLicense": "The Apache License, Version 2.0",
5-
"moduleVersion": "1.12.0",
6-
"moduleName": "com.beanit:asn1bean"
4+
"moduleLicense": "The Apache License, Version 2.0"
75
},
86
{
9-
"moduleLicense": "The Apache License, Version 2.0",
10-
"moduleVersion": "1.9.0",
11-
"moduleName": "com.beanit:iec61850bean"
7+
"moduleLicense": "Apache License, Version 2.0"
128
},
139
{
14-
"moduleLicense": "Apache License, Version 2.0",
15-
"moduleVersion": "2.16.1",
16-
"moduleName": "commons-io:commons-io"
10+
"moduleLicense": "Apache 2.0"
11+
},
12+
{
13+
"moduleLicense": "The Apache Software License, Version 2.0"
1714
},
1815
{
1916
"comment": "MIT can be included into Apache 2.0 according https://www.apache.org/legal/resolved.html#category-a (31.1.23)",
@@ -30,6 +27,12 @@
3027
"comment": "uses dual license, we use Eclipse Public License - v 1.0 which can be included into Apache 2.0 according to https://www.apache.org/legal/resolved.html#category-b (31.1.23)",
3128
"moduleVersion": "1.5.6",
3229
"moduleName": "ch.qos.logback:logback-classic"
30+
},
31+
{
32+
"comment": "MIT can be included into Apache 2.0 according https://www.apache.org/legal/resolved.html#category-a (03.06.2024)",
33+
"moduleLicense": "MIT-0",
34+
"moduleVersion": "1.0.4",
35+
"moduleName": "org.reactivestreams:reactive-streams"
3336
}
3437
]
35-
}
38+
}

conformance-tests/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ dependencies {
1414
implementation 'ch.qos.logback:logback-classic:1.5.6'
1515
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.13'
1616

17+
implementation("com.fasterxml.jackson.core:jackson-databind:2.17.1")
18+
1719
implementation group: 'com.beanit', name: 'iec61850bean', version: '1.9.0'
1820
implementation group: 'commons-io', name: 'commons-io', version: '2.16.1'
1921

2022
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
2123
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
2224
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
2325

26+
implementation("com.hivemq:hivemq-mqtt-client:1.3.3")
2427
}
2528

2629
jar {

conformance-tests/checkLicense.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
32
# Skript to check proper licensing setup
43

54
./gradlew clean checkLicense

conformance-tests/conformance-tests/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

conformance-tests/run-all-tests.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
#!/bin/bash
2+
3+
./gradlew checkLicense
4+
5+
echo TODO: start the below as screen sessions, stop after tests!
6+
echo "cd ../deployments/n61850-smqtt-ubuntu2004/ && docker-compose up"
7+
echo "cd ../hedera-61850-gateway/ && docker-compose up"
8+
echo mosquitto_sub -t fledge/south-schedule -i schedule-subscriber
9+
echo mosquitto_sub -t fledge/south-command -i cmd-subscriber
10+
211
./gradlew test
312
echo "All tests run. Please see the logs in testResults/ directory for details"

conformance-tests/run-demo-tests.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

conformance-tests/src/main/java/org/openmuc/fnn/steuerbox/Context.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
package org.openmuc.fnn.steuerbox;
1515

16+
import com.fasterxml.jackson.databind.ObjectMapper;
17+
1618
import javax.xml.parsers.DocumentBuilderFactory;
1719

1820
/**
@@ -22,7 +24,13 @@ public class Context {
2224

2325
private static final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
2426

27+
private static final ObjectMapper objectMapper = new ObjectMapper();
28+
2529
public static DocumentBuilderFactory getDocumentBuilderFactory() {
2630
return factory;
2731
}
32+
33+
public static ObjectMapper getObjectMapper() {
34+
return objectMapper;
35+
}
2836
}

conformance-tests/src/main/java/org/openmuc/fnn/steuerbox/ScheduleWriterExample.java

Lines changed: 0 additions & 111 deletions
This file was deleted.

conformance-tests/src/main/java/org/openmuc/fnn/steuerbox/models/AllianderDER.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
package org.openmuc.fnn.steuerbox.models;
1515

1616
import com.beanit.iec61850bean.ServiceError;
17-
import org.openmuc.fnn.steuerbox.IEC61850Utility;
1817
import org.openmuc.fnn.steuerbox.scheduling.ScheduleDefinitions;
1918
import org.openmuc.fnn.steuerbox.scheduling.ScheduleType;
19+
import org.openmuc.fnn.steuerbox.testutils.IEC61850Utility;
2020

2121
import java.io.IOException;
2222

0 commit comments

Comments
 (0)