amazon-ecs-agent
amazon-ecs-agent copied to clipboard
engine: skip some tests on Mac
Summary
Building a CNI configuration is supported only on Linux and Windows. On other platforms, it fails with "unsupported platform": https://github.com/aws/amazon-ecs-agent/blob/05730614021c70c7f39d7cc00264aaffc5b5b0d3/agent/api/task/task_unsupported.go#L96-L100
However, 3 tests in engine
package that rely on CNI are not skipped on other platforms.
Implementation details
Skip the impacted tests by checking GOOS
in runtime. Do not use build tags because there are other tests in the same
file that pass.
Testing
cd agent
go test -tags unit ./engine
New tests cover the changes: no
Description for the changelog
engine: skip some tests on Mac
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Hmm, wonder if we should avoid returning an error in task_unsupported.go instead. I think it's safe to do that since we're not building binaries for unsupported platforms anyways.
@fierlion let's decide to close or merge this PR
closing for now -- will reopen as part of future work