Skip to content

Commit

Permalink
fix: use localhost and not the production services during test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlasDiablo committed Jan 17, 2024
1 parent 2c36040 commit 6a2e505
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions services/ark-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM cnrsinist/ezs-python-server:py3.9-no16-1.0.6

USER root

RUN npm install @ezs/[email protected]

WORKDIR /app/public
# Declare files to copy in .dockerignore
COPY --chown=daemon:daemon . /app/public/
8 changes: 6 additions & 2 deletions services/ark-tools/examples.http
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
# ⚠ L'utilisation de ce fichier générera le stockage inutile d'identifiants ARK dans la base.
# C'est pourquoi il est déconseillé d'exécuter ces exemples.

@host = http://localhost:31976
#@host = https://ark-tools.services.istex.fr


# Attribution d'ARK aux objets d'une série
POST https://ark-tools.services.istex.fr/v1/67375/stamp?subpublisher=XXX&indent=true HTTP/1.1
POST {{host}}/v1/67375/stamp?subpublisher=XXX&indent=true HTTP/1.1
Content-Type: application/json

[
Expand All @@ -16,7 +20,7 @@ Content-Type: application/json


# Attribution d'ARK aux objets d'une série
POST https://ark-tools.services.istex.fr/v1/67375/stamp?subpublisher=XXX&indent=true HTTP/1.1
POST {{host}}/v1/67375/stamp?subpublisher=XXX&indent=true HTTP/1.1
Content-Type: application/json

[
Expand Down
4 changes: 2 additions & 2 deletions services/ark-tools/tests.hurl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
POST https://ark-tools.services.istex.fr/v1/67375/stamp?subpublisher=XXX&indent=true
POST {{host}}/v1/67375/stamp?subpublisher=XXX&indent=true
content-type: application/json
[
{ "id":"12345","value": true },
Expand All @@ -12,7 +12,7 @@ jsonpath "$[0].value" matches /ark:\/67375\/XXX-.{8}-./
jsonpath "$[1].id" == "6789"
jsonpath "$[1].value" matches /ark:\/67375\/XXX-.{8}-./

POST https://ark-tools.services.istex.fr/v1/67375/stamp?subpublisher=XXX&indent=true
POST {{host}}/v1/67375/stamp?subpublisher=XXX&indent=true
content-type: application/json
[
{
Expand Down

0 comments on commit 6a2e505

Please sign in to comment.