Skip to content
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

Tests point to 'agent.exe' rather than the real exe name #1207

Closed
tehshwann opened this issue Jan 22, 2018 · 4 comments
Closed

Tests point to 'agent.exe' rather than the real exe name #1207

tehshwann opened this issue Jan 22, 2018 · 4 comments

Comments

@tehshwann
Copy link
Contributor

tehshwann commented Jan 22, 2018

Summary

Trying to invoke tests on my installation of agent, but tests fail because the depend on agent being named 'agent.exe' which is not the real name of the binary use in any production use case,

Description

Trying to invoke tests on my installation of agent, but tests fail because the depend on agent being named 'agent.exe' which is not the real name of the binary use in any production use case,

Expected Behavior

All references to the agent exe should use consistent naming

Observed Behavior

Tests reference an inconsistent binary name of 'agent.exe' rather than 'amazon-ecs-agent.exe'

Environment Details

ECS Windows

Supporting Log Snippets

2018-01-22 23:11:34 - [TST]::[INF]::Running windows_simple_tests from test binary C:\qGuard\Test-ECSAgentFunctionalTests\go\src\github.com\aws\amazon-ecs-agent-test\out\test-artifacts\windows-simple-tests.exe
2018-01-22 23:11:34 - [TST]::[INF]::--- FAIL: TestDataVolume (0.00s)
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662694803047700
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata011665279\data
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata011665279 to store test data in
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:34 - [TST]::[INF]::--- FAIL: TestHostname (0.00s)
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662694804047600
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata615286482\data
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata615286482 to store test data in
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:34 - [TST]::[INF]::--- FAIL: TestSimpleExit (0.00s)
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662694805047100
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata023820297\data
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata023820297 to store test data in
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:34 - [TST]::[INF]::--- FAIL: TestWorkingDir (0.00s)
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662694805047100
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata650658772\data
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata650658772 to store test data in
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:34 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:34 - [TST]::[INF]::FAIL
2018-01-22 23:11:34 - [TST]::[ERR]::At least one test failed in windows_simple_tests with exit code 1
2018-01-22 23:11:34 - [TST]::[INF]::Running windows_simple_tests took 0.2035323sec
2018-01-22 23:11:34 - [TST]::[INF]::Running windows_handwritten_tests from test binary C:\qGuard\Test-ECSAgentFunctionalTests\go\src\github.com\aws\amazon-ecs-agent-test\out\test-artifacts\windows-handwritten-tests.exe
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestPullInvalidImage (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695036037800
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata924023783\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata924023783 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestSavedState (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695038038100
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata221867546\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata221867546 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestSavedStateWithInvalidImageAndCleanup (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695038038100
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata536497841\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata536497841 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestPortResourceContention (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695039038600
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata396077660\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata396077660 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestLabels (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695042038800
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata075013643\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata075013643 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestLogdriverOptions (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695043038600
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata851824622\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata851824622 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestTaskCleanup (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695043038600
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata393313397\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata393313397 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestNetworkModeNone (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695044039000
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata339650896\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata339650896 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestCustomAttributesWithMaxOptions (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695045037100
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata286461551\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata286461551 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestAWSLogsDriver (0.03s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695077037000
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata661382402\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata661382402 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestMetadataServiceValidator (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695078037100
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata078815865\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata078815865 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestTelemetry (0.05s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695108024200
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata215537028\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata215537028 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::--- FAIL: TestOOMContainer (0.00s)
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:86: Registry location test_path_1516662695129032000
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:96: datadir C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata246267667\data
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:104: Created directory C:\Users\ADMINI~1\AppData\Local\Temp\2\ecs_integ_testdata246267667 to store test data in
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:129: Agent start invocation failed with exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::	utils_windows.go:108: exec: ".\\agent.exe": file does not exist
2018-01-22 23:11:35 - [TST]::[INF]::FAIL
@samuelkarp
Copy link
Contributor

Hard-coded here: https://github.com/aws/amazon-ecs-agent/blob/v1.16.2/agent/functional_tests/util/utils_windows.go#L123

We definitely had intended to change this and I guess it slipped through the cracks.

@petderek
Copy link
Contributor

Couple improvements I'd recommend as part of this:

  • configurable executable name instead of a configurable folder
  • run the agent as a windows service instead of invoked directly

@samuelkarp
Copy link
Contributor

run the agent as a windows service instead of invoked directly

I think that's probably worth handling separately as it's somewhat unrelated to the issue here about executable name.

@adnxn
Copy link
Contributor

adnxn commented Oct 25, 2018

closing issue, resolved with #1573

@adnxn adnxn closed this as completed Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants