canonical / testflinger

https://testflinger.readthedocs.io/en/latest/
GNU General Public License v3.0
11 stars 17 forks source link

Refine submit action check #290

Closed boukeas closed 3 months ago

boukeas commented 3 months ago

Description

The submit composite action used nc (netcat) to check if the Testflinger server was listening at the appropriate port. This was a simple test that often failed to detect connectivity issues that would later cause the submit action to fail (e.g. proxy problems), partly because nc operates at a lower protocol level (TCP) than the actual HTTPS Testflinger requests.

In this PR, the nc test is replaced by a more refined one that uses curl to check if an HTTPS connection can be established with the Testflinger server.

Documentation

No changes to the documentation are required.

Tests

The action was tested:

boukeas commented 3 months ago

@plars Thanks for the review and the suggestion.

I updated the PR, adding the verbose option and also capturing standard error to a file, so that the diagnostics are only displayed in case of an issue.