Test result from my runtest script for Nikita and n5test

Thomas Sødring thomas.sodring at hioa.no
Tue Jan 31 10:19:57 CET 2017


Nice!

On 01/31/2017 10:10 AM, Petter Reinholdtsen wrote:
> I've extended <URL: https://github.com/petterreinholdtsen/noark5-tester >
> to traverse recursively from the top and visit all the URLs it can
> find, as well as create all the object types mentioned in run_curl.sh
> from Thomas.  This is the result:
>
> success: found base
> success: correct content-type for base
> success: found _links in json response
> http://localhost:8092/noark5v4/login
> success: able to log in
> recursively discovering URLs from the root
> success: MIME type is application/vnd.noark5-v4+json for url .
> failure: unable to fetch http://localhost:8092/noark5v4/hateoas-api/arkivstruktur
This is OK. The links will be published in an update today.

> failure: unable to fetch http://localhost:8092/noark5v4/hateoas-api/sakarkiv
> failure: MIME type is application/vnd.noark5-v4+json for url http://localhost:8092/noark5v4/gui
> failure: unable to fetch http://localhost:8092/noark5v4/importAPI
These should really return a "501 Not implemented yet". Except the gui.
The GUI should have a return type of html. Will check that!
> success: found .
> success: found http://localhost:8092/noark5v4/gui
> success: created fond
> success: created serie
> success: created file
> success: created record
> success: created document description
> success: created document object
> 13 successes, 4 failures
>
> Running the same test against the http://n5test.kxml.no/api/ example
> site, give this output:
>
> success: found base
> success: correct content-type for base
> success: found _links in json response
> http://n5test.kxml.no/api/login
> failure: unable to log in, trying other things
> recursively discovering URLs from the root
> success: MIME type is application/vnd.noark5-v4+json for url .
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur
> failure: unable to fetch http://n5test.kxml.no/api/sakarkiv
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/arkiv{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/ny-arkivskaper
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/arkivskaper{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/arkivdel{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/klassifikasjonssystem{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/klasse{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/mappe{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/registrering{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/basisregistrering{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/dokumentbeskrivelse{?$filter&$orderby&$top&$skip&$search}
> success: MIME type is application/vnd.noark5-v4+json for url http://n5test.kxml.no/api/arkivstruktur/dokumentobjekt{?$filter&$orderby&$top&$skip&$search}
> success: found .
> success: found http://n5test.kxml.no/api/arkivstruktur
> success: found http://n5test.kxml.no/api/arkivstruktur/arkivdel{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/arkivskaper{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/arkiv{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/basisregistrering{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/dokumentbeskrivelse{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/dokumentobjekt{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/klasse{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/klassifikasjonssystem{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/mappe{?$filter&$orderby&$top&$skip&$search}
> success: found http://n5test.kxml.no/api/arkivstruktur/ny-arkivskaper
> success: found http://n5test.kxml.no/api/arkivstruktur/registrering{?$filter&$orderby&$top&$skip&$search}
> 29 successes, 2 failures
> Traceback (most recent call last):
>   File "./runtest", line 215, in <module>
>     main()
>   File "./runtest", line 212, in main
>     t.runtests()
>   File "./runtest", line 206, in runtests
>     self.testNewDocument()
>   File "./runtest", line 131, in testNewDocument
>     (c, res) = self.json_post(createfondsurl, fondsdata)
>   File "./runtest", line 42, in json_post
>     response = self._browser.open(request)
>   File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open
>     return self._mech_open(url, data, timeout=timeout)
>   File "/usr/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open
>     raise response
> mechanize._response.httperror_seek_wrapper: HTTP Error 404: Not Found
>
> It fails when it try to create a new fond, as there is no login and no
> way to create new stuff on that demo site (as far as I can tell).
>
> JFYI
>
The demo site as far as I know is simply read! I also think that there
is stuff missing, but I'm not sure. E.g take the sakarkiv link. That
replies with a 404 if I remember correctly. I honestly do not know what
the status of the project is. No one at the National Archive is replying
to any requests for information. I have chosen to pretty much ignore the
demo site until I get a response saying that it is correct. My guess is
that they don't have a budget to pay the interface developer and they
are waiting until they can free some more money.

 - Tom


More information about the nikita-noark mailing list