-
Notifications
You must be signed in to change notification settings - Fork 42
issues/146 - review Fleet test and sync with stand-alone test #150
Conversation
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
|
||
@revoke-token | ||
Scenario: Revoking the enrollment token for an agent | ||
Given an agent is deployed to Fleet | ||
And the agent is un-enrolled | ||
And the "agent" process is "stopped" on the host | ||
When the enrollment token is revoked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that we are going to need the ability to create tokens using APIs, so that we can revoke it without affecting the default one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed via chat - to confirm here, I agree - we should manage this better:
to create a new token (and they are config specific)
POST to /api/ingest_manager/fleet/enrollment-api-keys
with a POST body like:
{“name”:“test-token”,“config_id”:“99a28950-bae3-11ea-9dd9-f131eddc2919"}
the config_id is the id of the configuration and name is arbitrary name
to get the config_ids available, you can call a GET to /api/ingest_manager/agent_configs
and walk the returned list, config_id is listed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it working!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More context on this: we decided to have each scenario to prepare its state (i.e. enrollment token) so that we can have each scenario idempotent
@package-added-to-default-config | ||
Scenario: Execute packages api calls | ||
Given an agent is deployed to Fleet | ||
And the package list api returns successfully | ||
When the "Cisco" latest package version is installed successfull | ||
And a "Cisco" package datasource is added to the 'default' configuration | ||
Then the "default" configuration shows the "Cisco" datasource added | ||
|
||
@new-agent-configuration | ||
Scenario: Assign an Agent to a new configuration | ||
Given an agent is deployed to Fleet | ||
And the agent is listed in Fleet as online | ||
When a new configuration named "Test Fleet" is created | ||
And the Agent is assigned to the configuration "Test Fleet" | ||
Then a new enrollment token is created | ||
And there is new data in the index from agent | ||
|
||
@new-configuration-new-package | ||
Scenario: Add a new config and a new package and assign an agent | ||
Given an agent is deployed to Fleet | ||
When a new configuration named "Test - custom logs" is created | ||
And the "custom logs" package datasource is added to the "Test - custom logs" configuration | ||
And the Agent is assigned to the configuration "Test - custom logs" | ||
And the "Test - custom logs" configuration shows the "custom logs" datasource added | ||
Then there is new data in the index from agent from "custom logs" stream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wdyt about adding these three scenarios once we complete the above ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd like to hustle thru these as well, they are pertinent and blocking us from expanding out packages testing here. But if we want to put them to a separate update that's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing! Let me complete the existing ones and I'lll add this. Let's keep this open until then. We are on the right (and fast) track!
Hey Eric, I'm downloading this branch to resolve conflicts locally and push it again as a new PR (keeping your commits, of course). I'll close this one. As a side note, I'd recommend using your fork to send PRs (traditional open source flow), so that we do not add other branches to this repo than the needed ones (master, and releases). I suggest this because then the CI will catch the branch and use cloud resources to build the branch plus the cloud resources for the PR. I also noticed you forked |
indeed - i'll fork it right! Thanks Manu. |
#146
per issue I am reviewing and syncing this up to what we checked in for stand-alone agent.
I also added 3 new scenarios, the last of which can be copy / pasted into a new feature file for packages assessment, one for each package we want to assess, tho I don't think we can expect data to show up unless we actually have that software running so we'll have to chop off the last bit of the assessment.
@new-configuration-new-package
Scenario: Add a new config and a new package and assign an agent
Given an agent is deployed to Fleet
When a new configuration named "Test - custom logs" is created
And the "custom logs" package datasource is added to the "Test - custom logs" configuration
And the Agent is assigned to the configuration "Test - custom logs"
And the "Test - custom logs" configuration shows the "custom logs" datasource added
Then there is new data in the index from agent from "custom logs" stream