Skip to content

Commit 1385b87

Browse files
committed
fix ITs
1 parent 78bd5ff commit 1385b87

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

src/test/java/de/rwth/idsg/steve/certification/ocpp16/AbstractOcpp16JsonCsms.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import de.rwth.idsg.steve.utils.__DatabasePreparer__;
2626
import de.rwth.idsg.steve.web.dto.RestCallback;
2727
import lombok.extern.slf4j.Slf4j;
28+
import ocpp.cp._2015._10.GetConfigurationRequest;
29+
import ocpp.cp._2015._10.GetConfigurationResponse;
2830
import ocpp.cp._2015._10.KeyValue;
2931
import ocpp.cs._2015._10.AuthorizationStatus;
3032
import ocpp.cs._2015._10.AuthorizeRequest;
@@ -216,6 +218,18 @@ static StartTransactionResponse enterChargingState(OcppJsonChargePoint chargePoi
216218
return startTransactionResponse;
217219
}
218220

221+
/**
222+
* SteVe started sending them after each Change Configuration. So, the station needs expect them.
223+
*
224+
* https://github.com/steve-community/steve/pull/2039
225+
*/
226+
static void expectGetConf(OcppJsonChargePoint chargePoint) {
227+
chargePoint.expectRequest(
228+
new GetConfigurationRequest().withKey(),
229+
new GetConfigurationResponse()
230+
);
231+
}
232+
219233
OcppJsonChargePoint defaultStation() {
220234
return new OcppJsonChargePoint(OcppVersion.V_16, REGISTERED_CHARGE_BOX_ID, Helpers.getJsonPath(serverProperties));
221235
}

src/test/java/de/rwth/idsg/steve/certification/ocpp16/Ocpp16JsonCsmsCertificationIT.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ public void test_TC_021_CSMS_ChangeSetConfiguration() {
664664

665665
assertEquals(ConfigurationStatus.ACCEPTED, successResponse(operationFuture.join()));
666666

667+
expectGetConf(chargePoint);
668+
667669
chargePoint.close();
668670
}
669671

@@ -2284,6 +2286,8 @@ public void test_TC_073_CSMS_UpdateChargePointPasswordForHttpBasicAuth() {
22842286
);
22852287
assertEquals(ConfigurationStatus.ACCEPTED, successResponse(future.join()));
22862288

2289+
expectGetConf(chargePoint);
2290+
22872291
var record = dslContext
22882292
.selectFrom(CHARGE_BOX)
22892293
.where(CHARGE_BOX.CHARGE_BOX_ID.eq(REGISTERED_CHARGE_BOX_ID))
@@ -2813,6 +2817,8 @@ public void test_TC_083_CSMS_UpgradeChargePointSecurityProfileAccepted() {
28132817
);
28142818
assertEquals(ConfigurationStatus.ACCEPTED, successResponse(changeConfigFuture.join()));
28152819

2820+
expectGetConf(chargePoint);
2821+
28162822
var chargeBox = dslContext.selectFrom(CHARGE_BOX)
28172823
.where(CHARGE_BOX.CHARGE_BOX_ID.eq(REGISTERED_CHARGE_BOX_ID))
28182824
.fetchOne();

0 commit comments

Comments
 (0)