Skip to content

Sync ManageAgent test document: add set-env action#727

Open
sky333999 wants to merge 3 commits into
mainfrom
sync-ssm-document-20260720
Open

Sync ManageAgent test document: add set-env action#727
sky333999 wants to merge 3 commits into
mainfrom
sync-ssm-document-20260720

Conversation

@sky333999

@sky333999 sky333999 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Adds a 'set-env' action and 'optionalEnvironmentVariable' parameter to the test ManageAgent document, delegating to the ctl set-env action added in aws/amazon-cloudwatch-agent#2211.

Do not merge before #2211 is released — integration tests exercising set-env require an agent build whose ctl supports the action.

@sky333999
sky333999 requested a review from a team as a code owner July 20, 2026 22:22
@sky333999

sky333999 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Ran the full ssm_document suite (all 23 ec2_linux rows + all 7 ec2_windows rows) using a targeted subset workflow run:

Adds integration test cases for the new set-env action in the
ManageAgent document (synced in this branch, delegating to the
ctl set-env action from aws/amazon-cloudwatch-agent#2211):

- Happy path: custom key with a space-containing value; asserts
  command success, the ctl's "Set <KEY>" stdout, unchanged agent
  status/configstatus, and the pair persisted to env-config.json
  on disk (read back via AWS-RunShellScript/AWS-RunPowerShellScript
  with platform-specific paths).
- Merge: a second key persists alongside the first.
- Error path: empty optionalEnvironmentVariable fails with the
  document-level error message (new failure-path helper that
  requires terminal status Failed).

Cases are appended after the existing configure flow so prior
status assertions are unaffected, mirrored across the unix and
windows implementations.
@sky333999
sky333999 force-pushed the sync-ssm-document-20260720 branch from e8bea7b to 51928f0 Compare July 21, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant