diff --git a/integration/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala index 94da7de547..b64bbc9e04 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/HealthRouteE2ESpec.scala @@ -27,44 +27,14 @@ class HealthRouteE2ESpec extends E2ESpec { FiniteDuration(appConfig.defaultTimeout.toNanos, NANOSECONDS), ) - // Directory path for generated client test data - private val clientTestDataPath: Seq[String] = Seq("system", "health") - - // Collects client test data - private val clientTestDataCollector = new ClientTestDataCollector(appConfig) - "The Health Route" should { "return 'OK' for state 'Running'" in { - val request = Get(baseApiUrl + s"/health") - val response: HttpResponse = singleAwaitingRequest(request) - val responseStr: String = responseToString(response) - val responseHeadersStr: String = response.headers.map(_.toString).mkString("\n") + val request = Get(baseApiUrl + s"/health") + val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.OK) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "running-response", - fileExtension = "json", - ), - text = responseStr, - ), - ) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "response-headers", - fileExtension = "json", - ), - text = responseHeadersStr, - ), - ) } "return 'ServiceUnavailable' for state 'Stopped'" in { @@ -82,20 +52,8 @@ class HealthRouteE2ESpec extends E2ESpec { val request = Get(baseApiUrl + s"/health") val response: HttpResponse = singleAwaitingRequest(request) - val responseStr: String = responseToString(response) response.status should be(StatusCodes.ServiceUnavailable) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "stopped-response", - fileExtension = "json", - ), - text = responseStr, - ), - ) } "return 'ServiceUnavailable' for state 'MaintenanceMode'" in { @@ -112,21 +70,7 @@ class HealthRouteE2ESpec extends E2ESpec { val request = Get(baseApiUrl + s"/health") val response: HttpResponse = singleAwaitingRequest(request) - val responseStr: String = responseToString(response) - response.status should be(StatusCodes.ServiceUnavailable) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "maintenance-mode-response", - fileExtension = "json", - ), - text = responseStr, - ), - ) } - } } diff --git a/integration/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala index 19fb1989de..04b91028d8 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/admin/GroupsADME2ESpec.scala @@ -11,9 +11,6 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.knora.webapi.E2ESpec -import org.knora.webapi.e2e.ClientTestDataCollector -import org.knora.webapi.e2e.TestDataFileContent -import org.knora.webapi.e2e.TestDataFilePath import org.knora.webapi.messages.admin.responder.groupsmessages.GroupsADMJsonProtocol import org.knora.webapi.messages.store.triplestoremessages.StringLiteralV2 import org.knora.webapi.sharedtestdata.SharedTestDataADM @@ -32,11 +29,6 @@ import pekko.http.scaladsl.unmarshalling.Unmarshal class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { implicit def default: RouteTestTimeout = RouteTestTimeout(30.seconds) - // Directory path for generated client test data - private val clientTestDataPath: Seq[String] = Seq("admin", "groups") - - // Collects client test data - private val clientTestDataCollector = new ClientTestDataCollector(appConfig) private val imagesUser01Email = SharedTestDataADM.imagesUser01.email private val testPass = SharedTestDataADM.testPass @@ -51,16 +43,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { Get(baseApiUrl + s"/admin/groups") ~> addCredentials(BasicHttpCredentials(imagesUser01Email, testPass)) val response: HttpResponse = singleAwaitingRequest(request) assert(response.status === StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-groups-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return the group's information" in { @@ -69,16 +51,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { ) val response: HttpResponse = singleAwaitingRequest(request) assert(response.status === StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-group-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } } @@ -94,17 +66,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { | "selfjoin": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-group-with-custom-Iri-request", - fileExtension = "json", - ), - text = createGroupWithCustomIriRequest, - ), - ) - val request = Post( baseApiUrl + s"/admin/groups", HttpEntity(ContentTypes.`application/json`, createGroupWithCustomIriRequest), @@ -117,16 +78,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { // check that the custom IRI is correctly assigned result.id should be(customGroupIri) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-group-with-custom-Iri-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return 'BadRequest' if the supplied IRI for the group is not unique" in { @@ -165,17 +116,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { | "selfjoin": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-group-request", - fileExtension = "json", - ), - text = createGroupRequest, - ), - ) - val request = Post( baseApiUrl + "/admin/groups", HttpEntity(ContentTypes.`application/json`, createGroupRequest), @@ -190,20 +130,7 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { group.project should be(Some(SharedTestDataADM.imagesProjectExternal)) group.status should be(true) group.selfjoin should be(false) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-group-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) - - val iri = group.id - newGroupIri.set(iri) + newGroupIri.set(group.id) } "UPDATE a group" in { @@ -212,17 +139,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { | "name": "UpdatedGroupName", | "descriptions": [{"value": "UpdatedGroupDescription", "language": "en"}] |}""".stripMargin - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-group-request", - fileExtension = "json", - ), - text = updateGroupRequest, - ), - ) val groupIriEnc = java.net.URLEncoder.encode(newGroupIri.get, "utf-8") val request = Put( baseApiUrl + "/admin/groups/" + groupIriEnc, @@ -238,17 +154,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { groupInfo.project should be(Some(SharedTestDataADM.imagesProjectExternal)) groupInfo.status should be(true) groupInfo.selfjoin should be(false) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-group-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "DELETE a group" in { @@ -266,18 +171,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { groupInfo.project should be(Some(SharedTestDataADM.imagesProjectExternal)) groupInfo.status should be(false) groupInfo.selfjoin should be(false) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "delete-group-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) - } "CHANGE status of a group" in { @@ -286,17 +179,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { | "status": true |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "change-group-status-request", - fileExtension = "json", - ), - text = changeGroupStatusRequest, - ), - ) - val groupIriEnc = java.net.URLEncoder.encode(newGroupIri.get, "utf-8") val request = Put( baseApiUrl + "/admin/groups/" + groupIriEnc + "/status", @@ -312,17 +194,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { groupInfo.project should be(Some(SharedTestDataADM.imagesProjectExternal)) groupInfo.status should be(true) groupInfo.selfjoin should be(false) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "change-group-status-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } } @@ -333,16 +204,6 @@ class GroupsADME2ESpec extends E2ESpec with GroupsADMJsonProtocol { ) val response: HttpResponse = singleAwaitingRequest(request) assert(response.status === StatusCodes.OK, responseToString(response)) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-group-members-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } } } diff --git a/integration/src/test/scala/org/knora/webapi/e2e/admin/ProjectsADME2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/admin/ProjectsADME2ESpec.scala index 5789940211..b2e8d7bf0a 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/admin/ProjectsADME2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/admin/ProjectsADME2ESpec.scala @@ -20,9 +20,6 @@ import scala.concurrent.duration._ import org.knora.webapi.E2ESpec import org.knora.webapi.IRI -import org.knora.webapi.e2e.ClientTestDataCollector -import org.knora.webapi.e2e.TestDataFileContent -import org.knora.webapi.e2e.TestDataFilePath import org.knora.webapi.messages.admin.responder.projectsmessages._ import org.knora.webapi.messages.admin.responder.usersmessages.UsersADMJsonProtocol._ import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject @@ -45,12 +42,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { private val projectShortname = SharedTestDataADM.imagesProject.shortname private val projectShortcode = SharedTestDataADM.imagesProject.shortcode - // Directory path for generated client test data - private val clientTestDataPath: Seq[String] = Seq("admin", "projects") - - // Collects client test data - private val clientTestDataCollector = new ClientTestDataCollector(appConfig) - override lazy val rdfDataObjects: List[RdfDataObject] = List( RdfDataObject( path = "test_data/project_data/anything-data.ttl", @@ -68,16 +59,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { val projects: Seq[Project] = AkkaHttpUtils.httpResponseToJson(response).fields("projects").convertTo[Seq[Project]] projects.size should be(6) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-projects-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return the information for a single project identified by iri" in { @@ -86,16 +67,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { ) val response: HttpResponse = singleAwaitingRequest(request) assert(response.status === StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-project-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return the information for a single project identified by shortname" in { @@ -129,17 +100,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { settings.size should be(Some("!512,512")) settings.watermark should be(false) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-project-restricted-view-settings-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return the project's restricted view settings using its shortname" in { @@ -194,17 +154,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { | "selfjoin": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-project-with-custom-Iri-request", - fileExtension = "json", - ), - text = createProjectWithCustomIRIRequest, - ), - ) - val request = Post( baseApiUrl + s"/admin/projects", HttpEntity(ContentTypes.`application/json`, createProjectWithCustomIRIRequest), @@ -223,18 +172,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { result.longname should be(Some("new project with a custom IRI")) result.keywords should be(Seq("projectIRI")) result.description should be(Seq(StringLiteralV2.from("a project created with a custom IRI", Some("en")))) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-project-with-custom-Iri-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) - } "return 'BadRequest' if the supplied project IRI is not unique" in { @@ -281,16 +218,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { | "selfjoin": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-project-request", - fileExtension = "json", - ), - text = createProjectRequest, - ), - ) val request = Post( baseApiUrl + s"/admin/projects", HttpEntity(ContentTypes.`application/json`, createProjectRequest), @@ -308,17 +235,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { result.status should be(true) result.selfjoin should be(false) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-project-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) - newProjectIri.set(result.id) } @@ -426,16 +342,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { | "selfjoin": true |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-project-request", - fileExtension = "json", - ), - text = updateProjectRequest, - ), - ) val projectIriEncoded = URLEncoder.encode(newProjectIri.get, "utf-8") val request = Put( baseApiUrl + s"/admin/projects/iri/" + projectIriEncoded, @@ -455,17 +361,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { result.logo should be(Some("/fu/bar/baz-updated.jpg")) result.status should be(true) result.selfjoin should be(true) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-project-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "UPDATE a project with multi-language description" in { @@ -477,16 +372,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { | ] |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-project-with-multiple-description-request", - fileExtension = "json", - ), - text = updateProjectMultipleDescriptionRequest, - ), - ) val projectIriEncoded = URLEncoder.encode(newProjectIri.get, "utf-8") val request = Put( baseApiUrl + s"/admin/projects/iri/" + projectIriEncoded, @@ -499,17 +384,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { result.description.size should be(2) result.description should contain(StringLiteralV2.from(value = "Test Project", language = Some("en"))) result.description should contain(StringLiteralV2.from(value = "Test Project", language = Some("se"))) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-project-with-multiple-description-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "DELETE a project" in { @@ -522,19 +396,7 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { val result: Project = AkkaHttpUtils.httpResponseToJson(response).fields("project").convertTo[Project] result.status should be(false) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "delete-project-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } - } "used to query members [FUNCTIONALITY]" should { @@ -547,17 +409,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { val members: Seq[User] = AkkaHttpUtils.httpResponseToJson(response).fields("members").convertTo[Seq[User]] members.size should be(4) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-project-members-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return all members of a project identified by shortname" in { @@ -591,16 +442,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { val members: Seq[User] = AkkaHttpUtils.httpResponseToJson(response).fields("members").convertTo[Seq[User]] members.size should be(2) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-project-admin-members-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return all admin members of a project identified by shortname" in { @@ -685,16 +526,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { val keywords: Seq[String] = AkkaHttpUtils.httpResponseToJson(response).fields("keywords").convertTo[Seq[String]] keywords.size should be(21) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-keywords-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return all keywords for a single project" in { @@ -707,16 +538,6 @@ class ProjectsADME2ESpec extends E2ESpec with ProjectsADMJsonProtocol { val keywords: Seq[String] = AkkaHttpUtils.httpResponseToJson(response).fields("keywords").convertTo[Seq[String]] keywords should be(SharedTestDataADM.incunabulaProject.keywords) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-project-keywords-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return empty list for a project without keywords" in { diff --git a/integration/src/test/scala/org/knora/webapi/e2e/admin/UsersADME2ESpec.scala b/integration/src/test/scala/org/knora/webapi/e2e/admin/UsersADME2ESpec.scala index fb20742f04..335b8d4b51 100644 --- a/integration/src/test/scala/org/knora/webapi/e2e/admin/UsersADME2ESpec.scala +++ b/integration/src/test/scala/org/knora/webapi/e2e/admin/UsersADME2ESpec.scala @@ -12,9 +12,6 @@ import scala.concurrent.Await import scala.concurrent.duration._ import org.knora.webapi._ -import org.knora.webapi.e2e.ClientTestDataCollector -import org.knora.webapi.e2e.TestDataFileContent -import org.knora.webapi.e2e.TestDataFilePath import org.knora.webapi.messages.admin.responder.groupsmessages.GroupsADMJsonProtocol import org.knora.webapi.messages.admin.responder.projectsmessages.Project import org.knora.webapi.messages.admin.responder.projectsmessages.ProjectsADMJsonProtocol @@ -69,12 +66,6 @@ class UsersADME2ESpec private val donaldIri = new MutableTestIri private val systemUserIriEncoded = java.net.URLEncoder.encode(KnoraSystemInstances.Users.SystemUser.id, "utf-8") - // Directory path for generated client test data - private val clientTestDataPath: Seq[String] = Seq("admin", "users") - - // Collects client test data - private val clientTestDataCollector = new ClientTestDataCollector(appConfig) - /** * Convenience method returning the users project memberships. * @@ -119,16 +110,6 @@ class UsersADME2ESpec Get(baseApiUrl + s"/admin/users") ~> addRootUserCredentials() val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-users-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return a single user profile identified by iri" in { @@ -138,16 +119,6 @@ class UsersADME2ESpec val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-user-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return a single user profile identified by email" in { @@ -178,32 +149,12 @@ class UsersADME2ESpec val request = Get(baseApiUrl + s"/admin/users/iri/$normalUserIriEnc") ~> addRootUserCredentials() val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-user-for-SystemAdmin-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return single user for itself" in { val request = Get(baseApiUrl + s"/admin/users/iri/$normalUserIriEnc") ~> addNormalUserCredentials() val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-user-for-itself-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return only public information for single user for non SystemAdmin and self" in { @@ -216,16 +167,6 @@ class UsersADME2ESpec result.status should be(false) result.email should be("") result.username should be("") - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-user-for-nonSystemAdmin-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return only public information for single user with anonymous access" in { @@ -238,48 +179,18 @@ class UsersADME2ESpec result.status should be(false) result.email should be("") result.username should be("") - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-user-for-anonymous-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return all users for SystemAdmin" in { val request = Get(baseApiUrl + s"/admin/users") ~> addRootUserCredentials() val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-users-for-SystemAdmin-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return all users for ProjectAdmin" in { val request = Get(baseApiUrl + s"/admin/users") ~> addProjectAdminUserCredentials() val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-users-for-ProjectAdmin-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return 'Forbidden' for all users for normal user" in { @@ -326,16 +237,6 @@ class UsersADME2ESpec | "systemAdmin": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-user-with-custom-Iri-request", - fileExtension = "json", - ), - text = createUserWithCustomIriRequest, - ), - ) val request = Post( baseApiUrl + s"/admin/users", HttpEntity(ContentTypes.`application/json`, createUserWithCustomIriRequest), @@ -348,17 +249,6 @@ class UsersADME2ESpec // check that the custom IRI is correctly assigned result.id should be(customUserIri) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-user-with-custom-Iri-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return 'BadRequest' if the supplied IRI for the user is not unique" in { @@ -495,16 +385,6 @@ class UsersADME2ESpec | "systemAdmin": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-user-request", - fileExtension = "json", - ), - text = createUserRequest, - ), - ) val request = Post( baseApiUrl + s"/admin/users", HttpEntity(ContentTypes.`application/json`, createUserRequest), @@ -523,17 +403,6 @@ class UsersADME2ESpec result.lang should be("en") donaldIri.set(result.id) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-user-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return a 'BadRequest' if the supplied username is not unique" in { @@ -549,16 +418,6 @@ class UsersADME2ESpec | "systemAdmin": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-user-request-duplicate-username", - fileExtension = "json", - ), - text = createUserRequest, - ), - ) val request = Post( baseApiUrl + s"/admin/users", HttpEntity(ContentTypes.`application/json`, createUserRequest), @@ -566,17 +425,6 @@ class UsersADME2ESpec val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.BadRequest) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-user-response-duplicate-username", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return a 'BadRequest' if the supplied email is not unique" in { @@ -592,16 +440,6 @@ class UsersADME2ESpec | "systemAdmin": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-user-request-duplicate-email", - fileExtension = "json", - ), - text = createUserRequest, - ), - ) val request = Post( baseApiUrl + s"/admin/users", HttpEntity(ContentTypes.`application/json`, createUserRequest), @@ -609,17 +447,6 @@ class UsersADME2ESpec val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.BadRequest) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "create-user-response-duplicate-email", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "authenticate the newly created user using HttpBasicAuth" in { @@ -659,17 +486,6 @@ class UsersADME2ESpec | "lang": "de" |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-request", - fileExtension = "json", - ), - text = updateUserRequest, - ), - ) - val userIriEncoded = java.net.URLEncoder.encode(donaldIri.get, "utf-8") val request = Put( baseApiUrl + s"/admin/users/iri/$userIriEncoded/BasicUserInformation", @@ -684,17 +500,6 @@ class UsersADME2ESpec result.givenName should be("Big Donald") result.familyName should be("Duckmann") result.lang should be("de") - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "return 'BadRequest' if user IRI is None and 'NotFound' if user IRI is '' in update user request" in { @@ -703,17 +508,6 @@ class UsersADME2ESpec | "username": "donald.without.iri.duck" |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-request-without-iri", - fileExtension = "json", - ), - text = updateUserRequest, - ), - ) - val missingUserIri = "" val request = Put( baseApiUrl + s"/admin/users/iri/$missingUserIri/BasicUserInformation", @@ -723,17 +517,6 @@ class UsersADME2ESpec response.status should be(StatusCodes.NotFound) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-response-without-iri-1", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) - val missingUserIriNone = None val request2 = Put( baseApiUrl + s"/admin/users/iri/$missingUserIriNone/BasicUserInformation", @@ -742,18 +525,6 @@ class UsersADME2ESpec val response2: HttpResponse = singleAwaitingRequest(request2) response2.status should be(StatusCodes.BadRequest) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-response-without-iri-2", - fileExtension = "json", - ), - text = responseToString(response2), - ), - ) - } "return 'Forbidden' when updating another user's password if a requesting user is not a SystemAdmin" in { @@ -778,17 +549,6 @@ class UsersADME2ESpec | "newPassword": "test123456" |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-password-request", - fileExtension = "json", - ), - text = changeUserPasswordRequest, - ), - ) - val request1 = Put( baseApiUrl + s"/admin/users/iri/${URLEncoder.encode(normalUser.id, "utf-8")}/Password", HttpEntity(ContentTypes.`application/json`, changeUserPasswordRequest), @@ -796,17 +556,6 @@ class UsersADME2ESpec val response1: HttpResponse = singleAwaitingRequest(request1) response1.status should be(StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-password-response", - fileExtension = "json", - ), - text = responseToString(response1), - ), - ) - // check if the password was changed, i.e. if the new one is accepted val request2 = Get(baseApiUrl + s"/v2/authentication") ~> addCredentials( BasicHttpCredentials(normalUser.email, "test123456"), @@ -846,17 +595,6 @@ class UsersADME2ESpec | "requesterPassword": "test" |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "incomplete-update-user-password-request", - fileExtension = "json", - ), - text = changeUserPasswordRequest, - ), - ) - val request1 = Put( baseApiUrl + s"/admin/users/iri/${URLEncoder.encode(normalUser.id, "utf-8")}/Password", HttpEntity(ContentTypes.`application/json`, changeUserPasswordRequest), @@ -865,17 +603,6 @@ class UsersADME2ESpec response1.status should be(StatusCodes.BadRequest) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "incomplete-update-user-password-response", - fileExtension = "json", - ), - text = responseToString(response1), - ), - ) - // check that the password was not changed, i.e. the old one is still accepted val request2 = Get(baseApiUrl + s"/v2/authentication") ~> addCredentials( BasicHttpCredentials(normalUser.email, "test654321"), @@ -890,17 +617,6 @@ class UsersADME2ESpec | "newPassword": "testABC" |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "incomplete-update-user-password-request-2", - fileExtension = "json", - ), - text = changeUserPasswordRequest, - ), - ) - val request1 = Put( baseApiUrl + s"/admin/users/iri/${URLEncoder.encode(normalUser.id, "utf-8")}/Password", HttpEntity(ContentTypes.`application/json`, changeUserPasswordRequest), @@ -909,17 +625,6 @@ class UsersADME2ESpec response1.status should be(StatusCodes.BadRequest) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "incomplete-update-user-password-response-2", - fileExtension = "json", - ), - text = responseToString(response1), - ), - ) - // check that the password was not changed, i.e. the old one is still accepted val request2 = Get(baseApiUrl + s"/v2/authentication") ~> addCredentials( BasicHttpCredentials(normalUser.email, "test654321"), @@ -934,16 +639,6 @@ class UsersADME2ESpec | "status": false |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-status-request", - fileExtension = "json", - ), - text = changeUserStatusRequest, - ), - ) val donaldIriEncoded = java.net.URLEncoder.encode(donaldIri.get, "utf-8") val request = Put( baseApiUrl + s"/admin/users/iri/$donaldIriEncoded/Status", @@ -954,16 +649,6 @@ class UsersADME2ESpec val result: User = AkkaHttpUtils.httpResponseToJson(response).fields("user").convertTo[User] result.status should be(false) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-status-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "update the user's system admin membership status" in { @@ -972,16 +657,6 @@ class UsersADME2ESpec | "systemAdmin": true |}""".stripMargin - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-system-admin-membership-request", - fileExtension = "json", - ), - text = changeUserSystemAdminMembershipRequest, - ), - ) val donaldIriEncoded = java.net.URLEncoder.encode(donaldIri.get, "utf-8") val request = Put( baseApiUrl + s"/admin/users/iri/$donaldIriEncoded/SystemAdmin", @@ -995,17 +670,6 @@ class UsersADME2ESpec .get("http://www.knora.org/ontology/knora-admin#SystemProject") .head should equal(List("http://www.knora.org/ontology/knora-admin#SystemAdmin")) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "update-user-system-admin-membership-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) - // Throw BadRequest exception if user is built-in user val badRequest = Put( baseApiUrl + s"/admin/users/iri/$systemUserIriEncoded/SystemAdmin", @@ -1068,16 +732,6 @@ class UsersADME2ESpec val response: HttpResponse = singleAwaitingRequest(request) response.status should be(StatusCodes.OK) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "delete-user-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "not allow deleting the system user" in { @@ -1114,16 +768,6 @@ class UsersADME2ESpec // testing getUserProjectMemberships method, which should return the same result projects should contain allElementsOf getUserProjectMemberships(multiUserIri) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-user-project-memberships-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } } @@ -1151,17 +795,6 @@ class UsersADME2ESpec val membershipsAfterUpdate = getUserProjectMemberships(normalUserIri) membershipsAfterUpdate should equal(Seq(SharedTestDataADM.imagesProjectExternal)) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "add-user-to-project-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "don't add user to project if user is already a member" in { @@ -1177,17 +810,6 @@ class UsersADME2ESpec // verify that users's project memberships weren't changed val membershipsAfterTryUpdate = getUserProjectMemberships(normalUserIri) membershipsAfterTryUpdate should equal(membershipsBeforeTryUpdate) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "user-already-member-of-project-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "remove user from project" in { @@ -1203,19 +825,7 @@ class UsersADME2ESpec val membershipsAfterUpdate = getUserProjectMemberships(normalUserIri) membershipsAfterUpdate should equal(Seq.empty[Project]) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "remove-user-from-project-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } - } "used to query project admin group memberships" should { @@ -1236,18 +846,7 @@ class UsersADME2ESpec // explicitly testing 'getUserProjectsAdminMemberships' method, which should return the same result projects should contain allElementsOf getUserProjectAdminMemberships(multiUserIri) - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-user-project-admin-group-memberships-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } - } "used to modify project admin group membership" should { @@ -1268,7 +867,7 @@ class UsersADME2ESpec assert(responseAddUserToProject.status === StatusCodes.OK) - // verfiy that user is not yet project admin in images project + // verify that user is not yet project admin in images project val membershipsBeforeUpdate = getUserProjectAdminMemberships(normalUser.id) membershipsBeforeUpdate should equal(Seq()) @@ -1283,17 +882,6 @@ class UsersADME2ESpec // verify that user has been added as project admin to images project val membershipsAfterUpdate = getUserProjectAdminMemberships(normalUser.id) membershipsAfterUpdate should equal(Seq(SharedTestDataADM.imagesProjectExternal)) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "add-user-to-project-admin-group-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "remove user from project admin group" in { @@ -1311,17 +899,6 @@ class UsersADME2ESpec val membershipsAfterUpdate = getUserProjectAdminMemberships(normalUser.id) membershipsAfterUpdate should equal(Seq.empty[Project]) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "remove-user-from-project-admin-group-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "remove user from project which also removes him from project admin group" in { @@ -1367,19 +944,7 @@ class UsersADME2ESpec // testing getUserGroupMemberships method, which should return the same result groups should contain allElementsOf getUserGroupMemberships(multiUserIri) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "get-user-group-memberships-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } - } "used to modify group membership" should { @@ -1396,17 +961,6 @@ class UsersADME2ESpec val membershipsAfterUpdate = getUserGroupMemberships(normalUserIri) membershipsAfterUpdate should equal(Seq(SharedTestDataADM.imagesReviewerGroupExternal)) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "add-user-to-group-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } "remove user from group" in { @@ -1422,17 +976,6 @@ class UsersADME2ESpec val membershipsAfterUpdate = getUserProjectMemberships(normalUserIri) membershipsAfterUpdate should equal(Seq.empty[Group]) - - clientTestDataCollector.addFile( - TestDataFileContent( - filePath = TestDataFilePath( - directoryPath = clientTestDataPath, - filename = "remove-user-from-group-response", - fileExtension = "json", - ), - text = responseToString(response), - ), - ) } } } diff --git a/webapi/scripts/expected-client-test-data.txt b/webapi/scripts/expected-client-test-data.txt index 80ad287f53..6997c5ffa6 100644 --- a/webapi/scripts/expected-client-test-data.txt +++ b/webapi/scripts/expected-client-test-data.txt @@ -1,18 +1,5 @@ test-data/ test-data/admin/ -test-data/admin/groups/ -test-data/admin/groups/change-group-status-request.json -test-data/admin/groups/change-group-status-response.json -test-data/admin/groups/create-group-request.json -test-data/admin/groups/create-group-response.json -test-data/admin/groups/create-group-with-custom-Iri-request.json -test-data/admin/groups/create-group-with-custom-Iri-response.json -test-data/admin/groups/delete-group-response.json -test-data/admin/groups/get-group-members-response.json -test-data/admin/groups/get-group-response.json -test-data/admin/groups/get-groups-response.json -test-data/admin/groups/update-group-request.json -test-data/admin/groups/update-group-response.json test-data/admin/lists/ test-data/admin/lists/add-child-to-second-child-request.json test-data/admin/lists/add-child-to-second-child-response.json @@ -94,72 +81,6 @@ test-data/admin/permissions/update-defaultObjectAccess-permission-forResourceCla test-data/admin/permissions/update-defaultObjectAccess-permission-forResourceClass-response.json test-data/admin/permissions/update-defaultObjectAccess-permission-hasPermissions-request.json test-data/admin/permissions/update-defaultObjectAccess-permission-hasPermissions-response.json -test-data/admin/projects/ -test-data/admin/projects/create-project-request.json -test-data/admin/projects/create-project-response.json -test-data/admin/projects/create-project-with-custom-Iri-request.json -test-data/admin/projects/create-project-with-custom-Iri-response.json -test-data/admin/projects/delete-project-response.json -test-data/admin/projects/get-keywords-response.json -test-data/admin/projects/get-project-admin-members-response.json -test-data/admin/projects/get-project-keywords-response.json -test-data/admin/projects/get-project-members-response.json -test-data/admin/projects/get-project-response.json -test-data/admin/projects/get-project-restricted-view-settings-response.json -test-data/admin/projects/get-projects-response.json -test-data/admin/projects/update-project-request.json -test-data/admin/projects/update-project-response.json -test-data/admin/projects/update-project-with-multiple-description-request.json -test-data/admin/projects/update-project-with-multiple-description-response.json -test-data/admin/users/ -test-data/admin/users/add-user-to-group-response.json -test-data/admin/users/add-user-to-project-admin-group-response.json -test-data/admin/users/add-user-to-project-response.json -test-data/admin/users/create-user-request-duplicate-email.json -test-data/admin/users/create-user-request-duplicate-username.json -test-data/admin/users/create-user-request.json -test-data/admin/users/create-user-response-duplicate-email.json -test-data/admin/users/create-user-response-duplicate-username.json -test-data/admin/users/create-user-response.json -test-data/admin/users/create-user-with-custom-Iri-request.json -test-data/admin/users/create-user-with-custom-Iri-response.json -test-data/admin/users/delete-user-response.json -test-data/admin/users/get-user-for-SystemAdmin-response.json -test-data/admin/users/get-user-for-anonymous-response.json -test-data/admin/users/get-user-for-itself-response.json -test-data/admin/users/get-user-for-nonSystemAdmin-response.json -test-data/admin/users/get-user-group-memberships-response.json -test-data/admin/users/get-user-project-admin-group-memberships-response.json -test-data/admin/users/get-user-project-memberships-response.json -test-data/admin/users/get-user-response.json -test-data/admin/users/get-users-for-ProjectAdmin-response.json -test-data/admin/users/get-users-for-SystemAdmin-response.json -test-data/admin/users/get-users-response.json -test-data/admin/users/incomplete-update-user-password-request-2.json -test-data/admin/users/incomplete-update-user-password-request.json -test-data/admin/users/incomplete-update-user-password-response-2.json -test-data/admin/users/incomplete-update-user-password-response.json -test-data/admin/users/remove-user-from-group-response.json -test-data/admin/users/remove-user-from-project-admin-group-response.json -test-data/admin/users/remove-user-from-project-response.json -test-data/admin/users/update-user-password-request.json -test-data/admin/users/update-user-password-response.json -test-data/admin/users/update-user-request-without-iri.json -test-data/admin/users/update-user-request.json -test-data/admin/users/update-user-response-without-iri-1.json -test-data/admin/users/update-user-response-without-iri-2.json -test-data/admin/users/update-user-response.json -test-data/admin/users/update-user-status-request.json -test-data/admin/users/update-user-status-response.json -test-data/admin/users/update-user-system-admin-membership-request.json -test-data/admin/users/update-user-system-admin-membership-response.json -test-data/admin/users/user-already-member-of-project-response.json -test-data/system/ -test-data/system/health/ -test-data/system/health/maintenance-mode-response.json -test-data/system/health/response-headers.json -test-data/system/health/running-response.json -test-data/system/health/stopped-response.json test-data/v2/ test-data/v2/lists/ test-data/v2/lists/listnode.json