Tâche #33875
Scénario #33747: [Evolution] Ajouter l'accès à l'API oneflow-template
test
100%
Associated revisions
Ajout test d'accès à l'API OneFlow (ref #33875)
run-module-tests.sh : correction du test oneflow (ref #33875)
History
#1 Updated by Ludwig Seys over 1 year ago
- Status changed from Nouveau to En cours
#2 Updated by Ludwig Seys over 1 year ago
- Status changed from En cours to À valider
- % Done changed from 0 to 100
sur un aca.hapy-2.8.1 instance default
CreoleGet --list | grep oneflow
qui doit retourner par defaut =>
activer_oneflow="oui"
ip_oneflow="127.0.0.1"
port_oneflow="2474"
on peut faire un curl avec les information donnée et un user/mdp
curl -u oneadmin:eole http://hapy.ac-test.fr/oneflow
si la commande renvoie quelque chose c'est que tout marche :)
pour tester plus loin on peu aussi faire au préalable un curl sans user/mdp, qui doit renvoyer un message du type : A username and password must be provided
Ou plus simple ouvrir son navigateur et rentrer https://hapy.ac-test.fr/oneflow
qui doit renvoyer une page blanche avec : https://hapy.ac-test.fr/oneflow
#3 Updated by Ludwig Seys over 1 year ago
- Status changed from À valider to Résolu
#4 Updated by Joël Cuissinat over 1 year ago
Test en 2.7.2 :
root@hapy:~# CreoleSet activer_oneflow oui root@hapy:~# CreoleGet --list | grep oneflow activer_oneflow="oui" ip_oneflow="127.0.0.1" port_oneflow="2474" root@hapy:~# reconfigure
root@hapy:~# curl https://hapy.ac-test.fr/oneflow A username and password must be providedroot@hapy:~#
root@hapy:~# curl -u oneadmin:eole https://hapy.ac-test.fr/oneflow <!DOCTYPE html> <html> <head> <style type="text/css"> body { text-align:center;font-family:helvetica,arial;font-size:22px; color:#888;margin:20px} #c {margin:0 auto;width:500px;text-align:left} </style> </head> <body> <h2>Sinatra doesn’t know this ditty.</h2> <img src='https://hapy.ac-test.fr/__sinatra__/404.png'> <div id="c"> Try this: <pre>get '/' do "Hello World" end </pre> </div> </body> </html>
root@hapy:~# oneflow-template list --server https://hapy.ac-test.fr/oneflow csrftoken
#5 Updated by Joël Cuissinat over 1 year ago
Test en 2.8.1
root@hapy:~# CreoleGet --list | grep oneflow activer_oneflow="oui" ip_oneflow="127.0.0.1" port_oneflow="2474" root@hapy:~# curl https://hapy.ac-test.fr/oneflow A username and password must be provided root@hapy:~# curl -u eoleone:eole https://hapy.ac-test.fr/oneflow/service_template { "DOCUMENT_POOL": { "DOCUMENT": [ { "ID": "0", "UID": "0", "GID": "0", "UNAME": "oneadmin", "GNAME": "oneadmin", "NAME": "Kubernetes 1.21 - KVM", "TYPE": "101", "PERMISSIONS": { "OWNER_U": "1", "OWNER_M": "1", "OWNER_A": "0", "GROUP_U": "0", "GROUP_M": "0", "GROUP_A": "0", "OTHER_U": "0", "OTHER_M": "0", "OTHER_A": "0" }, "TEMPLATE": { "BODY": { "name": "Kubernetes 1.21 - KVM", "deployment": "straight", "description": "", "roles": [ { "name": "master", "cardinality": 1, "vm_template": 2, "elasticity_policies": [ ], "scheduled_policies": [ ] }, { "name": "worker", "cardinality": 1, "vm_template": 2, "parents": [ "master" ], "elasticity_policies": [ ], "scheduled_policies": [ ] } ], "custom_attrs": { "ONEGATE_ENABLE": "M|boolean|Enable OneGate reporting? (req. for multi-node)| |YES" }, "ready_status_gate": true } } } ] } }
#6 Updated by Joël Cuissinat over 1 year ago
KO en 2.9.0 :\
#7 Updated by Joël Cuissinat over 1 year ago
- Status changed from Résolu to Fermé
- Remaining (hours) set to 0.0