From 3eb071499059a7907faf0ddc001838aa6b7bb0d3 Mon Sep 17 00:00:00 2001 From: arcuri82 Date: Mon, 18 Nov 2024 13:03:01 +0100 Subject: [PATCH] starting with new PUT oracles --- .../core/problem/rest/service/HttpSemanticsService.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/HttpSemanticsService.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/HttpSemanticsService.kt index 69f9007b58..8a76bdb136 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/HttpSemanticsService.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/HttpSemanticsService.kt @@ -74,7 +74,6 @@ class HttpSemanticsService { private fun addForHttpSemantics() { // – invalid location, leading to a 404 when doing a follow up GET -// – PUT with different status from 2xx should have no side-effects. Can be verified with before and after GET. PATCH can be tricky // – PUT for X, and then GET on it, should return exactly X (eg, check no partial updates) // – PUT if creating, must get 201. That means a previous GET must return 404 (or at least not a 2xx) . // – JSON-Merge-Patch: partial update should not impact other fields. Can have GET, PATCH, and GET to verify it @@ -85,6 +84,9 @@ class HttpSemanticsService { // – A repeated followup PUT with 201 on same endpoint should not return 201 (must enforce 200 or 204) putRepeatedCreated() + +// – PUT with different status from 2xx should have no side-effects. Can be verified with before and after GET. PATCH can be tricky + putSideEffects() } /**