J'utilise Squash version 6.
Je lance l''exécution automatique d'un cas de test depuis une campagne. Et en console je n'ai pas sortie, j'affiche un echo normalement.
Voici mon démarrage du docker
Voici mon fichier postman.yaml (affichage d'un "hello" sur le hook de postman en "before")sudo docker run -d \
--name orchestrator \
-p 7774:7774 \
-p 7775:7775 \
-p 7776:7776 \
-p 38368:38368 \
-p 24368:24368 \
-p 12312:12312 \
-p 8765:8765 \
-e SSH_CHANNEL_HOST=<squash_url>\
-e SSH_CHANNEL_USER=orchestrator \
-e SSH_CHANNEL_TAGS=ssh,linux,robotframework,postman,cypress \
-v /opt/squash-tm/trusted_key.pub:/etc/squashtf/squashtf.pub \
-e OPENTF_DEBUG=yes \
-e DEBUG_LEVEL=DEBUG \
squashtest/squash-orchestrator:latest
Voici mon enregistrement d'un agentapiVersion: opentestfactory.org/v1beta1
kind: ProviderConfig
current-context: default
contexts:
- context:
port: 443
host: 127.0.0.1
ssl_context: adhoc
logfile: postman.log
eventbus:
endpoint: https://127.0.0.1:38368
token: reuse
name: default
- context:
port: 7793
host: 127.0.0.1
ssl_context: disabled
trusted_authorities:
- /etc/squashtf/*
logfile: postman.log
enable_insecure_login: true
eventbus:
endpoint: http://127.0.0.1:38368
token: reuse
name: allinone
- context:
port: 8566
host: 127.0.0.1
ssl_context: disabled
eventbus:
endpoint: http://127.0.0.1:8765
token: reuse
logfile: postman.log
trusted_authorities:
- /etc/squashtf/*
enable_insecure_login: true
name: insecure
hooks:
- name: my_postman_hook
events:
- categoryPrefix: postman
category: execute
before:
- run: echo "hello"
Voici les dernières lignes de la log résultantesudo opentf-agent \
--name "default_agent" \
--tags ssh,linux,postman,cypress,junit \
--host <squash_url> \
--token <signed_jwt_token>
sudo docker logs orchestrator
Et on trouve donc les 3 erreurs suivantes:[2024-10-09 18:09:46,567] DEBUG in eventbus: Publication status code from 8b0fa8a7-c1f9-477e-ae29-ca3c62da632c is 200.
[2024-10-09 18:09:46,575] ERROR in eventbus: Publication status code from 4c9f32d1-215c-4c62-bd5a-f1629bdd9b48 is 422. Failure details: {"metadata":{},"apiVersion":"v1","status":null,"message":null,"reason":"Invalid message for kind opentestfactory.org/v1beta1/ExecutionCommand","details":{"validationReport":"The event opentestfactory.org/v1beta1/ExecutionCommand is not accepted by this module. List of accepted events :\nopentestfactory.org/v1alpha1/WorkflowCompleted\nopentestfactory.org/v1alpha1/WorkflowCanceled\nopentestfactory.org/v1alpha1/ExecutionCommand\nopentestfactory.org/v1alpha1/ExecutionResult\n"},"code":422,"kind":"Status"}.
[2024-10-09 18:09:46,580] DEBUG in eventbus: Publication status code from a8dfab98-7bc6-4858-a536-041f0bf42fef is 204.
[2024-10-09 18:09:46,586] INFO in rewriter: 127.0.0.1 - - "POST /inbox HTTP/1.1" 200 122 "-" "python-requests/2.28.2"
[2024-10-09 18:09:46,587] DEBUG in eventbus: Publication status code from 849d6f3b-26d7-43c3-8ed2-237de7fde8f8 is 200.
[2024-10-09 18:09:46,587] DEBUG in eventbus: Sending publication to 4c9f32d1-215c-4c62-bd5a-f1629bdd9b48.
[2024-10-09 18:09:46,595] DEBUG in eventbus: Processing a opentestfactory.org/v1alpha1/Notification publication.
[2024-10-09 18:09:46,596] DEBUG in eventbus: Found the following matching subscriptions, dispatching: ['8b0fa8a7-c1f9-477e-ae29-ca3c62da632c']
[2024-10-09 18:09:46,597] INFO in eventbus: 127.0.0.1 - - "POST /publications HTTP/1.1" 200 143 "-" "Apache-CXF/3.4.0"
[2024-10-09 18:09:46,599] DEBUG in eventbus: Processing a opentestfactory.org/v1alpha1/Notification publication.
[2024-10-09 18:09:46,599] DEBUG in eventbus: Sending publication to 8b0fa8a7-c1f9-477e-ae29-ca3c62da632c.
[2024-10-09 18:09:46,601] DEBUG in eventbus: Found the following matching subscriptions, dispatching: ['8b0fa8a7-c1f9-477e-ae29-ca3c62da632c']
[2024-10-09 18:09:46,603] INFO in eventbus: 127.0.0.1 - - "POST /publications HTTP/1.1" 200 143 "-" "Apache-CXF/3.4.0"
[2024-10-09 18:09:46,604] DEBUG in eventbus: Publication status code from 4c9f32d1-215c-4c62-bd5a-f1629bdd9b48 is 204.
[2024-10-09 18:09:46,604] DEBUG in eventbus: Sending publication to 8b0fa8a7-c1f9-477e-ae29-ca3c62da632c.
[2024-10-09 18:09:46,627] INFO in observer: 127.0.0.1 - - "POST /inbox HTTP/1.1" 200 122 "-" "python-requests/2.28.2"
[2024-10-09 18:09:46,627] INFO in observer: 127.0.0.1 - - "POST /inbox HTTP/1.1" 200 122 "-" "python-requests/2.28.2"
[2024-10-09 18:09:46,629] DEBUG in eventbus: Publication status code from 8b0fa8a7-c1f9-477e-ae29-ca3c62da632c is 200.
[2024-10-09 18:09:46,630] DEBUG in eventbus: Publication status code from 8b0fa8a7-c1f9-477e-ae29-ca3c62da632c is 200.
[2024-10-09 18:09:49,654] ERROR in startup: At least one service or plugin failed, aborting:
[2024-10-09 18:09:49,654] ERROR in startup: ['python3', '-m', 'opentf.plugins.sshee.main', '--context', 'allinone'] failed with return code 2
[2024-10-09 18:09:46,575] ERROR in eventbus: Publication status code from 4c9f32d1-215c-4c62-bd5a-f1629bdd9b48 is 422. Failure details: {"metadata":{},"apiVersion":"v1","status":null,"message":null,"reason":"Invalid message for kind opentestfactory.org/v1beta1/ExecutionCommand","details":{"validationReport":"The event opentestfactory.org/v1beta1/ExecutionCommand is not accepted by this module. List of accepted events :\nopentestfactory.org/v1alpha1/WorkflowCompleted\nopentestfactory.org/v1alpha1/WorkflowCanceled\nopentestfactory.org/v1alpha1/ExecutionCommand\nopentestfactory.org/v1alpha1/ExecutionResult\n"},"code":422,"kind":"Status"}.
[2024-10-09 18:09:49,654] ERROR in startup: At least one service or plugin failed, aborting:
[2024-10-09 18:09:49,654] ERROR in startup: ['python3', '-m', 'opentf.plugins.sshee.main', '--context', 'allinone'] failed with return code 2