-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing Agent reports incorrect capabilities on windows (#2035) #2070
Conversation
I think you need to update the windows test file agent_capability_windows_test.go to add the test case to check that we do not introduce redundant capabilities for windows. Currently, we do not have any test case there. |
for i, expected := range expectedCapabilities { | ||
assert.Equal(t, aws.StringValue(expected.Name), aws.StringValue(capabilities[i].Name)) | ||
assert.Equal(t, aws.StringValue(expected.Value), aws.StringValue(capabilities[i].Value)) | ||
} | ||
} | ||
|
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.
Can you add a comment here to give a description about what this test case is doing?
assert.NoError(t, err) | ||
assert.Equal(t, len(expectedCapabilities), len(capabilities)) | ||
for i, expected := range expectedCapabilities { | ||
|
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.
nit: this blank line can be removed.
17665e0
to
6b77b00
Compare
Summary
Fixing Agent reports incorrect capabilities on windows.
Issue - #2035
Implementation details
Implemented capabilities through methods that explicitly set it for a unix system and not for a windows
Testing
New tests cover the changes: Adding new unit tests
Verified by running following commands -
On Unix : docker run -v /var/run/docker.sock:/var/run/docker.sock amazon/amazon-ecs-agent --ecs-attributes
On Windows : aws --region us-east-1 ecs describe-container-instances --cluster window --container-instances 05ef0d5f98774e839c9e47b4158c5c57
Description for the changelog
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.