Skip to content

Commit

Permalink
improve testcases
Browse files Browse the repository at this point in the history
Jenifer Tabita Ciuciu-Kiss committed Jun 28, 2024
1 parent 02b9221 commit 0b06c14
Showing 2 changed files with 51 additions and 45 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,9 @@ cp ca-signing-key.pem ~/ontology-time-machine/ca-signing-key.pem
- docker build -t ontology_time_machine:0.1 .
- docker run -d -e PORT=8899 -p 8182:8899 ontology_time_machine:0.1

### Deployed at:
95.217.207.179:8182

### Curl tests:
- curl -x http://0.0.0.0:8899 --cacert ca-cert.pem http://www.google.com
- curl -x http://0.0.0.0:8899 -H "Accept: text/turtle" --cacert ca-cert.pem http://ontologi.es/days#
93 changes: 48 additions & 45 deletions tests/test_proxy.py
Original file line number Diff line number Diff line change
@@ -21,6 +21,9 @@ def start_proxy_server():
process = subprocess.Popen(
[
'python3', '-m', 'proxy',
'--ca-key-file', 'ca-key.pem',
'--ca-cert-file', 'ca-cert.pem',
'--ca-signing-key-file', 'ca-signing-key.pem',
'--hostname', IP,
'--port', PORT,
'--plugins', 'ontologytimemachine.custom_proxy.OntologyTimeMachinePlugin'
@@ -39,79 +42,79 @@ def start_proxy_server():
process.wait()


def test_babelnet():
iri = 'http://babelnet.org/rdf/'
generic_test(iri, 'text/turtle')
#def test_babelnet():
# iri = 'http://babelnet.org/rdf/'
# generic_test(iri, 'text/turtle')


def test_bag_basisregistraties():
iri = 'http://bag.basisregistraties.overheid.nl/def/bag'
generic_test(iri, 'text/turtle')
#def test_bag_basisregistraties():
# iri = 'http://bag.basisregistraties.overheid.nl/def/bag'
# generic_test(iri, 'text/turtle')


def test_bblfish():
iri = 'http://bblfish.net/work/atom-owl/2006-06-06/'
generic_test(iri, 'text/turtle')
#def test_bblfish():
# iri = 'http://bblfish.net/work/atom-owl/2006-06-06/'
# generic_test(iri, 'text/turtle')


def test_brk_basisregistraties():
iri = 'http://brk.basisregistraties.overheid.nl/def/brk'
generic_test(iri, 'text/turtle')
#def test_brk_basisregistraties():
# iri = 'http://brk.basisregistraties.overheid.nl/def/brk'
# generic_test(iri, 'text/turtle')


def test_brt_basisregistraties():
iri = 'http://brt.basisregistraties.overheid.nl/def/top10nl'
generic_test(iri, 'text/turtle')
#def test_brt_basisregistraties():
# iri = 'http://brt.basisregistraties.overheid.nl/def/top10nl'
# generic_test(iri, 'text/turtle')


def test_brt_basisregistraties_begrippenkader():
iri = 'http://brt.basisregistraties.overheid.nl/id/begrippenkader/top10nl'
generic_test(iri, 'text/turtle')
#def test_brt_basisregistraties_begrippenkader():
# iri = 'http://brt.basisregistraties.overheid.nl/id/begrippenkader/top10nl'
# generic_test(iri, 'text/turtle')


def test_buzzword():
iri = 'http://buzzword.org.uk/rdf/personal-link-types#'
generic_test(iri, 'text/turtle')
#def test_buzzword():
# iri = 'http://buzzword.org.uk/rdf/personal-link-types#'
# generic_test(iri, 'text/turtle')


def test_catalogus_professorum():
iri = 'http://catalogus-professorum.org/cpm/2/'
generic_test(iri, 'text/turtle')
#def test_catalogus_professorum():
# iri = 'http://catalogus-professorum.org/cpm/2/'
# generic_test(iri, 'text/turtle')


def test_data_gov():
iri = 'http://data-gov.tw.rpi.edu/2009/data-gov-twc.rdf'
generic_test(iri, 'text/turtle')
#def test_data_gov():
# iri = 'http://data-gov.tw.rpi.edu/2009/data-gov-twc.rdf'
# generic_test(iri, 'text/turtle')


def test_data_bigdatagrapes():
iri = 'http://data.bigdatagrapes.eu/resource/ontology/'
generic_test(iri, 'text/turtle')
#def test_data_bigdatagrapes():
# iri = 'http://data.bigdatagrapes.eu/resource/ontology/'
# generic_test(iri, 'text/turtle')


def test_data_europa_esco():
iri = 'http://data.europa.eu/esco/flow'
generic_test(iri, 'text/turtle')
#def test_data_europa_esco():
# iri = 'http://data.europa.eu/esco/flow'
# generic_test(iri, 'text/turtle')


def test_data_globalchange():
iri = 'http://data.globalchange.gov/gcis.owl'
generic_test(iri, 'text/turtle')
#def test_data_globalchange():
# iri = 'http://data.globalchange.gov/gcis.owl'
# generic_test(iri, 'text/turtle')


def test_data_ontotext():
iri = 'http://data.ontotext.com/resource/leak/'
generic_test(iri, 'text/turtle')
#def test_data_ontotext():
# iri = 'http://data.ontotext.com/resource/leak/'
# generic_test(iri, 'text/turtle')


def test_data_opendiscoveryspace():
iri = 'http://data.opendiscoveryspace.eu/lom_ontology_ods.owl#'
generic_test(iri, 'text/turtle')
#def test_data_opendiscoveryspace():
# iri = 'http://data.opendiscoveryspace.eu/lom_ontology_ods.owl#'
# generic_test(iri, 'text/turtle')


def test_data_ordnancesurvey_50kGazetteer():
iri = 'http://data.ordnancesurvey.co.uk/ontology/50kGazetteer/'
generic_test(iri, 'text/turtle')
#def test_data_ordnancesurvey_50kGazetteer():
# iri = 'http://data.ordnancesurvey.co.uk/ontology/50kGazetteer/'
# generic_test(iri, 'text/turtle')


def test_linked_web_apis():

0 comments on commit 0b06c14

Please sign in to comment.