Test result from my runtest script for Nikita and n5test

Petter Reinholdtsen pere at hungry.com
Tue Jan 31 10:10:18 CET 2017


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
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
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

-- 
Happy hacking
Petter Reinholdtsen


More information about the nikita-noark mailing list