From 048bf777997bdbf599240645fc66612c98abf3c2 Mon Sep 17 00:00:00 2001 From: vincent van beek Date: Fri, 27 Mar 2026 16:49:40 +0100 Subject: Add import topology (#393) * add a the posibility to import and export topogies in JSON format * fix web-runner integration, there were several bugs and mismatches between new implementations in OpenDC and the UI --- .../web/server/rest/user/TopologyResourceTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'opendc-web/opendc-web-server/src/test/java/org') diff --git a/opendc-web/opendc-web-server/src/test/java/org/opendc/web/server/rest/user/TopologyResourceTest.java b/opendc-web/opendc-web-server/src/test/java/org/opendc/web/server/rest/user/TopologyResourceTest.java index 277376e5..b3b668dd 100644 --- a/opendc-web/opendc-web-server/src/test/java/org/opendc/web/server/rest/user/TopologyResourceTest.java +++ b/opendc-web/opendc-web-server/src/test/java/org/opendc/web/server/rest/user/TopologyResourceTest.java @@ -156,6 +156,23 @@ public final class TopologyResourceTest { .statusCode(400); } + /** + * Test to create a topology with a duplicate name. + */ + @Test + @TestSecurity( + user = "test_user_1", + roles = {"openid"}) + public void testCreateDuplicateName() { + given().pathParam("project", "1") + .body(new Topology.Create("Test Topology testUpdate", List.of())) + .contentType(ContentType.JSON) + .when() + .post() + .then() + .statusCode(409); + } + /** * Test that tries to obtain a topology without token. */ -- cgit v1.2.3