From d0f99cfb08d1cdbd67507ddf8ec45253def72f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Cant=C3=B9?= Date: Fri, 10 Nov 2023 12:13:49 +0100 Subject: [PATCH] add tests for pycsw --- .../CSW/pycsw/DescribeRecord-json.bru | 38 ++++++ bruno/catalogue/CSW/pycsw/DescribeRecord.bru | 38 ++++++ .../pycsw/Exception-GetRecords-badsrsname.bru | 59 +++++++++ .../Exception-GetRecords-elementname.bru | 46 +++++++ .../Exception-GetRecords-invalid-xml.bru | 46 +++++++ .../CSW/pycsw/GetCapabilities-SOAP.bru | 47 ++++++++ .../CSW/pycsw/GetCapabilities-sections.bru | 46 +++++++ .../pycsw/GetCapabilities-updatesequence.bru | 43 +++++++ bruno/catalogue/CSW/pycsw/GetCapabilities.bru | 43 +++++++ .../CSW/pycsw/GetDomain-parameter.bru | 38 ++++++ .../CSW/pycsw/GetDomain-property.bru | 38 ++++++ .../CSW/pycsw/GetRecordById-json.bru | 39 ++++++ bruno/catalogue/CSW/pycsw/GetRecordById.bru | 39 ++++++ .../CSW/pycsw/GetRecords-all-json.bru | 40 +++++++ .../pycsw/GetRecords-all-resulttype-hits.bru | 40 +++++++ .../GetRecords-all-resulttype-validate.bru | 40 +++++++ .../CSW/pycsw/GetRecords-all-sortby-bbox.bru | 46 +++++++ bruno/catalogue/CSW/pycsw/GetRecords-all.bru | 40 +++++++ .../pycsw/GetRecords-bbox-filter-crs84.bru | 51 ++++++++ .../GetRecords-cql-title-and-abstract.bru | 43 +++++++ .../CSW/pycsw/GetRecords-cql-title.bru | 43 +++++++ .../pycsw/GetRecords-distributedsearch.bru | 49 ++++++++ .../CSW/pycsw/GetRecords-elementname.bru | 40 +++++++ bruno/catalogue/CSW/pycsw/GetRecords-end.bru | 40 +++++++ .../GetRecords-filter-and-bbox-freetext.bru | 57 +++++++++ .../pycsw/GetRecords-filter-and-nested-or.bru | 72 +++++++++++ .../GetRecords-filter-and-nested-or2.bru | 68 +++++++++++ .../GetRecords-filter-anytext-and-not.bru | 60 ++++++++++ .../pycsw/GetRecords-filter-anytext-equal.bru | 48 ++++++++ .../CSW/pycsw/GetRecords-filter-anytext.bru | 48 ++++++++ .../pycsw/GetRecords-filter-bbox-poslist.bru | 55 +++++++++ .../GetRecords-filter-bbox-reproject.bru | 51 ++++++++ .../pycsw/GetRecords-filter-bbox-sortby.bru | 57 +++++++++ .../CSW/pycsw/GetRecords-filter-bbox.bru | 51 ++++++++ .../CSW/pycsw/GetRecords-filter-between.bru | 54 +++++++++ .../pycsw/GetRecords-filter-function-bad.bru | 51 ++++++++ .../CSW/pycsw/GetRecords-filter-function.bru | 51 ++++++++ .../GetRecords-filter-invalid-poslist.bru | 60 ++++++++++ .../CSW/pycsw/GetRecords-filter-not-bbox.bru | 53 +++++++++ .../GetRecords-filter-or-bbox-freetext.bru | 57 +++++++++ .../pycsw/GetRecords-filter-or-nested-and.bru | 64 ++++++++++ .../GetRecords-filter-or-title-abstract.bru | 54 +++++++++ .../CSW/pycsw/GetRecords-maxrecords.bru | 40 +++++++ .../CSW/pycsw/GetRecords-requestid.bru | 40 +++++++ bruno/catalogue/CSW/pycsw/Harvest-default.bru | 45 +++++++ .../CSW/pycsw/Harvest-response-handler.bru | 46 +++++++ .../CSW/pycsw/Transaction-delete.bru | 52 ++++++++ .../CSW/pycsw/Transaction-insert.bru | 112 ++++++++++++++++++ .../CSW/pycsw/Transaction-update-full.bru | 112 ++++++++++++++++++ .../Transaction-update-recordproperty.bru | 57 +++++++++ bruno/catalogue/asserts.js | 2 +- 51 files changed, 2548 insertions(+), 1 deletion(-) create mode 100644 bruno/catalogue/CSW/pycsw/DescribeRecord-json.bru create mode 100644 bruno/catalogue/CSW/pycsw/DescribeRecord.bru create mode 100644 bruno/catalogue/CSW/pycsw/Exception-GetRecords-badsrsname.bru create mode 100644 bruno/catalogue/CSW/pycsw/Exception-GetRecords-elementname.bru create mode 100644 bruno/catalogue/CSW/pycsw/Exception-GetRecords-invalid-xml.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetCapabilities-SOAP.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetCapabilities-sections.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetCapabilities-updatesequence.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetCapabilities.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetDomain-parameter.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetDomain-property.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecordById-json.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecordById.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-all-json.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-all-resulttype-hits.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-all-resulttype-validate.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-all-sortby-bbox.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-all.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-bbox-filter-crs84.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-cql-title-and-abstract.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-cql-title.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-distributedsearch.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-elementname.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-end.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-and-bbox-freetext.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-and-nested-or.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-and-nested-or2.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext-and-not.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext-equal.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-poslist.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-reproject.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-sortby.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-between.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-function-bad.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-function.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-invalid-poslist.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-not-bbox.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-or-bbox-freetext.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-or-nested-and.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-filter-or-title-abstract.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-maxrecords.bru create mode 100644 bruno/catalogue/CSW/pycsw/GetRecords-requestid.bru create mode 100644 bruno/catalogue/CSW/pycsw/Harvest-default.bru create mode 100644 bruno/catalogue/CSW/pycsw/Harvest-response-handler.bru create mode 100644 bruno/catalogue/CSW/pycsw/Transaction-delete.bru create mode 100644 bruno/catalogue/CSW/pycsw/Transaction-insert.bru create mode 100644 bruno/catalogue/CSW/pycsw/Transaction-update-full.bru create mode 100644 bruno/catalogue/CSW/pycsw/Transaction-update-recordproperty.bru diff --git a/bruno/catalogue/CSW/pycsw/DescribeRecord-json.bru b/bruno/catalogue/CSW/pycsw/DescribeRecord-json.bru new file mode 100644 index 0000000..118c03b --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/DescribeRecord-json.bru @@ -0,0 +1,38 @@ +meta { + name: DescribeRecord-json + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + csw:Record + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/DescribeRecord.bru b/bruno/catalogue/CSW/pycsw/DescribeRecord.bru new file mode 100644 index 0000000..23fca82 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/DescribeRecord.bru @@ -0,0 +1,38 @@ +meta { + name: DescribeRecord + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + csw:Record + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Exception-GetRecords-badsrsname.bru b/bruno/catalogue/CSW/pycsw/Exception-GetRecords-badsrsname.bru new file mode 100644 index 0000000..645e09a --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Exception-GetRecords-badsrsname.bru @@ -0,0 +1,59 @@ +meta { + name: Exception-GetRecords-badsrsname + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + + ows:BoundingBox + + -90 -180 + 90 180 + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText') + expect(jObj.ExceptionReport.Exception.ExceptionText).to.have.string('Invalid Constraint: Invalid Filter request: Reprojection error: Invalid srsName') + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Exception-GetRecords-elementname.bru b/bruno/catalogue/CSW/pycsw/Exception-GetRecords-elementname.bru new file mode 100644 index 0000000..0100185 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Exception-GetRecords-elementname.bru @@ -0,0 +1,46 @@ +meta { + name: Exception-GetRecords-elementname + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + dc:foo + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText') + expect(jObj.ExceptionReport.Exception.ExceptionText).to.have.string('Invalid ElementName parameter value') + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Exception-GetRecords-invalid-xml.bru b/bruno/catalogue/CSW/pycsw/Exception-GetRecords-invalid-xml.bru new file mode 100644 index 0000000..6d6592f --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Exception-GetRecords-invalid-xml.bru @@ -0,0 +1,46 @@ +meta { + name: Exception-GetRecords-invalid-xml + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + dc:foo + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText') + expect(jObj.ExceptionReport.Exception.ExceptionText).to.have.string('Exception: the document is not valid.') + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetCapabilities-SOAP.bru b/bruno/catalogue/CSW/pycsw/GetCapabilities-SOAP.bru new file mode 100644 index 0000000..3c12f38 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetCapabilities-SOAP.bru @@ -0,0 +1,47 @@ +meta { + name: GetCapabilities-SOAP + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + + + 2.0.2 + + + application/xml + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetCapabilities-sections.bru b/bruno/catalogue/CSW/pycsw/GetCapabilities-sections.bru new file mode 100644 index 0000000..57da3c0 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetCapabilities-sections.bru @@ -0,0 +1,46 @@ +meta { + name: GetCapabilities-sections + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + 2.0.2 + + + ServiceProvider + + + application/xml + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetCapabilities-updatesequence.bru b/bruno/catalogue/CSW/pycsw/GetCapabilities-updatesequence.bru new file mode 100644 index 0000000..4990ed6 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetCapabilities-updatesequence.bru @@ -0,0 +1,43 @@ +meta { + name: GetCapabilities-updatesequence + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + 2.0.2 + + + application/xml + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetCapabilities.bru b/bruno/catalogue/CSW/pycsw/GetCapabilities.bru new file mode 100644 index 0000000..7a4e84c --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetCapabilities.bru @@ -0,0 +1,43 @@ +meta { + name: GetCapabilities + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + 2.0.2 + + + application/xml + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetDomain-parameter.bru b/bruno/catalogue/CSW/pycsw/GetDomain-parameter.bru new file mode 100644 index 0000000..91b6b0a --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetDomain-parameter.bru @@ -0,0 +1,38 @@ +meta { + name: GetDomain-parameter + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + GetRecords.CONSTRAINTLANGUAGE + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetDomain-property.bru b/bruno/catalogue/CSW/pycsw/GetDomain-property.bru new file mode 100644 index 0000000..f8bd284 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetDomain-property.bru @@ -0,0 +1,38 @@ +meta { + name: GetDomain-property + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + dc:title + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecordById-json.bru b/bruno/catalogue/CSW/pycsw/GetRecordById-json.bru new file mode 100644 index 0000000..7176866 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecordById-json.bru @@ -0,0 +1,39 @@ +meta { + name: GetRecordById-json + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + urn:uuid:94bc9c83-97f6-4b40-9eb8-a8e8787a5c63 + summary + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecordById.bru b/bruno/catalogue/CSW/pycsw/GetRecordById.bru new file mode 100644 index 0000000..b058939 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecordById.bru @@ -0,0 +1,39 @@ +meta { + name: GetRecordById + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + urn:uuid:94bc9c83-97f6-4b40-9eb8-a8e8787a5c63 + summary + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-all-json.bru b/bruno/catalogue/CSW/pycsw/GetRecords-all-json.bru new file mode 100644 index 0000000..9f3cb20 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-all-json.bru @@ -0,0 +1,40 @@ +meta { + name: GetRecords-all-json + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-all-resulttype-hits.bru b/bruno/catalogue/CSW/pycsw/GetRecords-all-resulttype-hits.bru new file mode 100644 index 0000000..cd1cb95 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-all-resulttype-hits.bru @@ -0,0 +1,40 @@ +meta { + name: GetRecords-all-resulttype-hits + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-all-resulttype-validate.bru b/bruno/catalogue/CSW/pycsw/GetRecords-all-resulttype-validate.bru new file mode 100644 index 0000000..82435cb --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-all-resulttype-validate.bru @@ -0,0 +1,40 @@ +meta { + name: GetRecords-all-resulttype-validate + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-all-sortby-bbox.bru b/bruno/catalogue/CSW/pycsw/GetRecords-all-sortby-bbox.bru new file mode 100644 index 0000000..fa76224 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-all-sortby-bbox.bru @@ -0,0 +1,46 @@ +meta { + name: GetRecords-all-sortby-bbox + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + ows:BoundingBox + DESC + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-all.bru b/bruno/catalogue/CSW/pycsw/GetRecords-all.bru new file mode 100644 index 0000000..b200488 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-all.bru @@ -0,0 +1,40 @@ +meta { + name: GetRecords-all + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-bbox-filter-crs84.bru b/bruno/catalogue/CSW/pycsw/GetRecords-bbox-filter-crs84.bru new file mode 100644 index 0000000..53c14ca --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-bbox-filter-crs84.bru @@ -0,0 +1,51 @@ +meta { + name: GetRecords-bbox-filter-crs84 + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + ows:BoundingBox + + -180 -90 + 180 90 + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-cql-title-and-abstract.bru b/bruno/catalogue/CSW/pycsw/GetRecords-cql-title-and-abstract.bru new file mode 100644 index 0000000..b3204b1 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-cql-title-and-abstract.bru @@ -0,0 +1,43 @@ +meta { + name: GetRecords-cql-title-and-abstract + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + dc:title like '%ips%' and dct:abstract like '%pharetra%' + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-cql-title.bru b/bruno/catalogue/CSW/pycsw/GetRecords-cql-title.bru new file mode 100644 index 0000000..e6af962 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-cql-title.bru @@ -0,0 +1,43 @@ +meta { + name: GetRecords-cql-title + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + dc:title like '%ips%' + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-distributedsearch.bru b/bruno/catalogue/CSW/pycsw/GetRecords-distributedsearch.bru new file mode 100644 index 0000000..decdc20 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-distributedsearch.bru @@ -0,0 +1,49 @@ +meta { + name: GetRecords-distributedsearch + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + + brief + + + + dc:title + Aquifers + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-elementname.bru b/bruno/catalogue/CSW/pycsw/GetRecords-elementname.bru new file mode 100644 index 0000000..9b86a9b --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-elementname.bru @@ -0,0 +1,40 @@ +meta { + name: GetRecords-elementname + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + dc:title + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-end.bru b/bruno/catalogue/CSW/pycsw/GetRecords-end.bru new file mode 100644 index 0000000..530389a --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-end.bru @@ -0,0 +1,40 @@ +meta { + name: GetRecords-end + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-bbox-freetext.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-bbox-freetext.bru new file mode 100644 index 0000000..4480862 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-bbox-freetext.bru @@ -0,0 +1,57 @@ +meta { + name: GetRecords-filter-and-bbox-freetext + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + + csw:AnyText + %lor% + + + ows:BoundingBox + + 47 -5 + 55 20 + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-nested-or.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-nested-or.bru new file mode 100644 index 0000000..0c9d4aa --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-nested-or.bru @@ -0,0 +1,72 @@ +meta { + name: GetRecords-filter-and-nested-or + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + + + dc:title + Aliquam fermentum purus quis arcu + + + dc:format + application/pdf + + + + dc:type + http://purl.org/dc/dcmitype/Dataset + + + dc:type + http://purl.org/dc/dcmitype/Service + + + dc:type + http://purl.org/dc/dcmitype/Image + + + dc:type + http://purl.org/dc/dcmitype/Text + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-nested-or2.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-nested-or2.bru new file mode 100644 index 0000000..200634d --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-and-nested-or2.bru @@ -0,0 +1,68 @@ +meta { + name: GetRecords-filter-and-nested-or2 + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + + + dc:title + Lorem% + + + + dc:type + http://purl.org/dc/dcmitype/Dataset + + + dc:type + http://purl.org/dc/dcmitype/Service + + + dc:type + http://purl.org/dc/dcmitype/Image + + + dc:type + http://purl.org/dc/dcmitype/Text + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext-and-not.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext-and-not.bru new file mode 100644 index 0000000..e46d60c --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext-and-not.bru @@ -0,0 +1,60 @@ +meta { + name: GetRecords-filter-anytext-and-not + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + summary + + + + + csw:AnyText + *lorem* + + + csw:AnyText + *ipsum* + + + + csw:AnyText + *dolor* + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext-equal.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext-equal.bru new file mode 100644 index 0000000..06c734c --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext-equal.bru @@ -0,0 +1,48 @@ +meta { + name: GetRecords-filter-anytext-equal + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + csw:AnyText + Lor + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext.bru new file mode 100644 index 0000000..f0095da --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-anytext.bru @@ -0,0 +1,48 @@ +meta { + name: GetRecords-filter-anytext + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + csw:AnyText + %Lor% + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-poslist.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-poslist.bru new file mode 100644 index 0000000..5d2eddb --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-poslist.bru @@ -0,0 +1,55 @@ +meta { + name: GetRecords-filter-bbox-poslist + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + ows:BoundingBox + + + + 47.00 -5.00 55.00 -5.00 55.00 20.00 47.00 20.00 47.00 -5.00 + + + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-reproject.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-reproject.bru new file mode 100644 index 0000000..92472a8 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-reproject.bru @@ -0,0 +1,51 @@ +meta { + name: GetRecords-filter-bbox-reproject + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + ows:BoundingBox + + -72310.84768270838 2013215.2698528299 + 279667.74290441966 2690819.5081175645 + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-sortby.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-sortby.bru new file mode 100644 index 0000000..3f443c9 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox-sortby.bru @@ -0,0 +1,57 @@ +meta { + name: GetRecords-filter-bbox-sortby + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + ows:BoundingBox + + 47 -5 + 55 20 + + + + + + + dc:title + DESC + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox.bru new file mode 100644 index 0000000..0437cd6 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-bbox.bru @@ -0,0 +1,51 @@ +meta { + name: GetRecords-filter-bbox + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + ows:BoundingBox + + 47 -5 + 55 20 + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-between.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-between.bru new file mode 100644 index 0000000..cde0c68 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-between.bru @@ -0,0 +1,54 @@ +meta { + name: GetRecords-filter-between + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + + dc:title + + Aliquam fermentum purus quis arcu + + + Maecenas enim + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-function-bad.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-function-bad.bru new file mode 100644 index 0000000..9ff141a --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-function-bad.bru @@ -0,0 +1,51 @@ +meta { + name: GetRecords-filter-function-bad + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + + dc:title + + LOREM IPSUM + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-function.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-function.bru new file mode 100644 index 0000000..4f05b5c --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-function.bru @@ -0,0 +1,51 @@ +meta { + name: GetRecords-filter-function + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + + dc:title + + LOREM IPSUM + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-invalid-poslist.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-invalid-poslist.bru new file mode 100644 index 0000000..138142b --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-invalid-poslist.bru @@ -0,0 +1,60 @@ +meta { + name: GetRecords-filter-invalid-poslist + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + full + + + + ows:BoundingBox + + + + 11 16 49 17 10 10 + + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-not-bbox.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-not-bbox.bru new file mode 100644 index 0000000..10975b7 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-not-bbox.bru @@ -0,0 +1,53 @@ +meta { + name: GetRecords-filter-not-bbox + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + + ows:BoundingBox + + 47 -5 + 55 20 + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-bbox-freetext.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-bbox-freetext.bru new file mode 100644 index 0000000..78fa647 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-bbox-freetext.bru @@ -0,0 +1,57 @@ +meta { + name: GetRecords-filter-or-bbox-freetext + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + brief + + + + + dc:title + foo + + + ows:BoundingBox + + 47 -5 + 55 20 + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-nested-and.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-nested-and.bru new file mode 100644 index 0000000..5acd205 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-nested-and.bru @@ -0,0 +1,64 @@ +meta { + name: GetRecords-filter-or-nested-and + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + + + dc:type + http://purl.org/dc/dcmitype/Image + + + dc:type + http://purl.org/dc/dcmitype/Dataset + + + + dc:title + Mauris% + + + dc:title + %neque + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-title-abstract.bru b/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-title-abstract.bru new file mode 100644 index 0000000..8647011 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-filter-or-title-abstract.bru @@ -0,0 +1,54 @@ +meta { + name: GetRecords-filter-or-title-abstract + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + + + dc:title + Mauris% + + + dct:abstract + foo + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-maxrecords.bru b/bruno/catalogue/CSW/pycsw/GetRecords-maxrecords.bru new file mode 100644 index 0000000..aaa3e88 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-maxrecords.bru @@ -0,0 +1,40 @@ +meta { + name: GetRecords-maxrecords + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/GetRecords-requestid.bru b/bruno/catalogue/CSW/pycsw/GetRecords-requestid.bru new file mode 100644 index 0000000..0dbcc50 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/GetRecords-requestid.bru @@ -0,0 +1,40 @@ +meta { + name: GetRecords-requestid + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + full + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("not an exception", function(){ + isNotAnException(res); + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Harvest-default.bru b/bruno/catalogue/CSW/pycsw/Harvest-default.bru new file mode 100644 index 0000000..0c62c7f --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Harvest-default.bru @@ -0,0 +1,45 @@ +meta { + name: Harvest-default + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/examples-ISO19139/dataset2_minimalst.xml + http://www.isotc211.org/schemas/2005/gmd/ + application/xml + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText', "Harvest operations are not supported") + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Harvest-response-handler.bru b/bruno/catalogue/CSW/pycsw/Harvest-response-handler.bru new file mode 100644 index 0000000..3b20067 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Harvest-response-handler.bru @@ -0,0 +1,46 @@ +meta { + name: Harvest-response-handler + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + http://kralidis.ca/pycsw/trunk/tests/test_iso.xml + http://www.isotc211.org/schemas/2005/gmd/ + application/xml + mailto:tkralidi + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText', "Harvest operations are not supported") + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Transaction-delete.bru b/bruno/catalogue/CSW/pycsw/Transaction-delete.bru new file mode 100644 index 0000000..77e0349 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Transaction-delete.bru @@ -0,0 +1,52 @@ +meta { + name: Transaction-delete + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + + + + apiso:Identifier + 12345 + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText', "Transaction operations are not supported") + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Transaction-insert.bru b/bruno/catalogue/CSW/pycsw/Transaction-insert.bru new file mode 100644 index 0000000..f298fd8 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Transaction-insert.bru @@ -0,0 +1,112 @@ +meta { + name: Transaction-insert + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + + + 12345 + + + + + + + + pycsw + + + + + + + + 2011-05-17 + + + + + + + pycsw record + + + + + 2011-05-17 + + + + + + + + + + Sample metadata record + + + eng + + + + + + + -180 + + + 180 + + + -90 + + + 90 + + + + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText', "Transaction operations are not supported") + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Transaction-update-full.bru b/bruno/catalogue/CSW/pycsw/Transaction-update-full.bru new file mode 100644 index 0000000..2aa8f87 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Transaction-update-full.bru @@ -0,0 +1,112 @@ +meta { + name: Transaction-update-full + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + + + 12345 + + + + + + + + pycsw + + + + + + + + 2011-05-17 + + + + + + + pycsw record + + + + + 2011-05-17 + + + + + + + + + + Sample metadata record + + + eng + + + + + + + -180 + + + 180 + + + -90 + + + 90 + + + + + + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText', "Transaction operations are not supported") + }) +} diff --git a/bruno/catalogue/CSW/pycsw/Transaction-update-recordproperty.bru b/bruno/catalogue/CSW/pycsw/Transaction-update-recordproperty.bru new file mode 100644 index 0000000..3a921a5 --- /dev/null +++ b/bruno/catalogue/CSW/pycsw/Transaction-update-recordproperty.bru @@ -0,0 +1,57 @@ +meta { + name: Transaction-update-recordproperty + type: http + seq: 3 +} + +post { + url: {{BASE_URL}}/csw/ + body: xml + auth: none +} + +body:xml { + + + + + apiso:Title + NEW_TITLE + + + + + apiso:Identifier + 12345 + + + + + + +} + +assert { + res.status: eq 200 +} + +tests { + const { XMLParser, XMLBuilder } = require("fast-xml-parser"); + const { + isValidXML, + isNotAnException, + } = require('./asserts'); + + test("response valid", function() { + isValidXML(res); + }) + + test("transactions are not supported", function(){ + const parser = new XMLParser({ removeNSPrefix: true }); + let jObj = parser.parse(res.getBody()); + + console.log(jObj) + expect(jObj).to.have.property('ExceptionReport') + expect(jObj).to.have.nested.property('ExceptionReport.Exception.ExceptionText', "Transaction operations are not supported") + }) +} diff --git a/bruno/catalogue/asserts.js b/bruno/catalogue/asserts.js index a1b84e5..f16666b 100644 --- a/bruno/catalogue/asserts.js +++ b/bruno/catalogue/asserts.js @@ -1,4 +1,4 @@ -const { XMLParser, XMLBuilder, XMLValidator} = require("fast-xml-parser"); +const { XMLParser, XMLBuilder } = require("fast-xml-parser"); function isValidXML(res) { const parser = new XMLParser();