This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
fix: use the status of the agent by hostname #181
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Log outputExpand to view the last 100 lines of log output
|
The failed tests complains about Go lint in a multi module project, so it's not related:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this PR doing?
It uses the hostname to get the status of the agent, because the hostname value is used as agentID. That way we are able to look up the status of the agent in the response of the API call, which returns a JSON with the list of agents including their active status.
We also revoke/remove the token that is created for the enrollment process (we create it on each scenario)
Why is it important?
It moves from a testing approach that is based in the existence of only one agent, to an approach that is based in the status of a specific agent (identified by hostname). We need this change because the API should be able to unenroll/remove an agent whenever the container representing it is removed (docker-compose down), and this is not currently happening.
Related issues