Skip to content

[tests] Use the TestCA context in all the manager tests in manager_test.go#2269

Merged
aaronlehmann merged 1 commit into
moby:masterfrom
cyli:pass-tc-context-to-manager-tests
Jun 20, 2017
Merged

[tests] Use the TestCA context in all the manager tests in manager_test.go#2269
aaronlehmann merged 1 commit into
moby:masterfrom
cyli:pass-tc-context-to-manager-tests

Conversation

@cyli
Copy link
Copy Markdown
Contributor

@cyli cyli commented Jun 20, 2017

So that the test names are displayed in the test output. This was useful for debugging manage test failures.

…o that

we can log the test name in the output.

Signed-off-by: Ying Li <ying.li@docker.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 20, 2017

Codecov Report

Merging #2269 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2269      +/-   ##
==========================================
- Coverage   60.36%   60.34%   -0.02%     
==========================================
  Files         125      125              
  Lines       20394    20394              
==========================================
- Hits        12311    12307       -4     
+ Misses       6694     6690       -4     
- Partials     1389     1397       +8

@aaronlehmann
Copy link
Copy Markdown
Collaborator

LGTM

As a random aside, when I was making the changes that caused the tests to run on a ram disk in CI, I noticed that my test runs were leaving behind temporary directories. My first suspicion was that we were forgetting some RemoveAll calls, but at least in the case of competing-ca-server, this doesn't seem to be the case. My next thought was that we were calling RemoveAll while files were still in use, and the call was failing. However, I spent some time adding assertions to many of the RemoveAll calls in the test code, and didn't see any fail, so figured that probably wasn't the problem.

It may be that in some tests, the directories get recreated after RemoveAll finishes.

I can reproduce the leakage locally, and I see a directory from competing-ca-server, several from swarm-ca-test, two from test-raft, and two from test-socket.

@aaronlehmann aaronlehmann merged commit 6e809fc into moby:master Jun 20, 2017
@cyli cyli deleted the pass-tc-context-to-manager-tests branch June 20, 2017 01:30
@cyli
Copy link
Copy Markdown
Contributor Author

cyli commented Jun 20, 2017

@aaronlehmann Thanks, I'll see if I can figure out what's causing those

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.

2 participants