Skip to content

Commit

Permalink
core: remove /cache_status endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Etienne Bougué <[email protected]>
  • Loading branch information
bougue-pe committed Nov 7, 2024
1 parent ca51ab4 commit 2559aaa
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 152 deletions.
90 changes: 0 additions & 90 deletions core/src/main/java/fr/sncf/osrd/api/InfraCacheStatusEndpoint.java

This file was deleted.

1 change: 0 additions & 1 deletion core/src/main/java/fr/sncf/osrd/cli/ApiServerCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public int run() {
new FkRegex("/v2/signal_projection", new SignalProjectionEndpointV2(infraManager)),
new FkRegex("/detect_conflicts", new ConflictDetectionEndpoint()),
new FkRegex("/v2/conflict_detection", new ConflictDetectionEndpointV2(infraManager)),
new FkRegex("/cache_status", new InfraCacheStatusEndpoint(infraManager)),
new FkRegex("/version", new VersionEndpoint()),
new FkRegex("/stdcm", new STDCMEndpoint(infraManager)),
new FkRegex("/v2/stdcm", new STDCMEndpointV2(infraManager)),
Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/fr/sncf/osrd/cli/WorkerCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class WorkerCommand : CliCommand {
SimulationEndpoint(infraManager, electricalProfileSetManager),
"/v2/signal_projection" to SignalProjectionEndpointV2(infraManager),
"/v2/conflict_detection" to ConflictDetectionEndpointV2(infraManager),
"/cache_status" to InfraCacheStatusEndpoint(infraManager),
"/version" to VersionEndpoint(),
"/v2/stdcm" to STDCMEndpointV2(infraManager),
"/infra_load" to InfraLoadEndpoint(infraManager),
Expand Down
40 changes: 0 additions & 40 deletions core/src/test/java/fr/sncf/osrd/api/InfraCacheStatusTest.java

This file was deleted.

22 changes: 2 additions & 20 deletions editoast/src/views/infra/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -957,17 +957,8 @@ pub mod tests {
#[rstest]
async fn infra_get() {
let db_pool = DbConnectionPoolV2::for_tests();
let mut core = MockingClient::new();
core.stub("/cache_status")
.method(reqwest::Method::POST)
.response(StatusCode::OK)
.body("{}")
.finish();

let app = TestAppBuilder::new()
.db_pool(db_pool.clone())
.core_client(core.into())
.build();
let app = TestAppBuilder::new().db_pool(db_pool.clone()).build();
let empty_infra = create_empty_infra(&mut db_pool.get_ok()).await;

let req = app.get(format!("/infra/{}", empty_infra.id).as_str());
Expand Down Expand Up @@ -1160,17 +1151,8 @@ pub mod tests {
#[rstest]
async fn infra_lock() {
let db_pool = DbConnectionPoolV2::for_tests();
let mut core = MockingClient::new();
core.stub("/cache_status")
.method(reqwest::Method::POST)
.response(StatusCode::OK)
.body("{}")
.finish();

let app = TestAppBuilder::new()
.db_pool(db_pool.clone())
.core_client(core.into())
.build();
let app = TestAppBuilder::new().db_pool(db_pool.clone()).build();
let empty_infra = create_empty_infra(&mut db_pool.get_ok()).await;

// Lock infra
Expand Down

0 comments on commit 2559aaa

Please sign in to comment.