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

Secrets using bind mounts #4368

Merged
merged 7 commits into from
Feb 1, 2017
Merged

Conversation

dnephin
Copy link

@dnephin dnephin commented Jan 20, 2017

Fake secrets in docker-compose using bind mounts

See moby/moby#30144 for the feature in docker stack deploy

@shin-
Copy link

shin- commented Jan 26, 2017

@dnephin Do you need help looking into those?

20:17:21 [all_py27] =================================== FAILURES ===================================

20:17:21 [all_py27] ________________ ProjectTest.test_project_up_healthy_dependency ________________

20:17:21 [all_py27] tests/integration/testcases.py:59: in wrapper

20:17:21 [all_py27]     return f(self, *args, **kwargs)

20:17:21 [all_py27] tests/integration/project_test.py:1431: in test_project_up_healthy_dependency

20:17:21 [all_py27]     config_data = build_config(config_dict)

20:17:21 [all_py27] E   TypeError: build_config() takes exactly 0 arguments (1 given)

20:17:21 [all_py27] ____________ ProjectTest.test_project_up_no_healthcheck_dependency _____________

20:17:21 [all_py27] tests/integration/testcases.py:59: in wrapper

20:17:21 [all_py27]     return f(self, *args, **kwargs)

20:17:21 [all_py27] tests/integration/project_test.py:1504: in test_project_up_no_healthcheck_dependency

20:17:21 [all_py27]     config_data = build_config(config_dict)

20:17:21 [all_py27] E   TypeError: build_config() takes exactly 0 arguments (1 given)

20:17:21 [all_py27] _______________ ProjectTest.test_project_up_unhealthy_dependency _______________

20:17:21 [all_py27] tests/integration/testcases.py:59: in wrapper

20:17:21 [all_py27]     return f(self, *args, **kwargs)

20:17:21 [all_py27] tests/integration/project_test.py:1468: in test_project_up_unhealthy_dependency

20:17:21 [all_py27]     config_data = build_config(config_dict)

20:17:21 [all_py27] E   TypeError: build_config() takes exactly 0 arguments (1 given)

20:17:21 [all_py27] ___________________ ProjectTest.test_project_up_with_secrets ___________________

20:17:21 [all_py27] tests/integration/testcases.py:59: in wrapper

20:17:21 [all_py27]     return f(self, *args, **kwargs)

20:17:21 [all_py27] tests/integration/project_test.py:1184: in test_project_up_with_secrets

20:17:21 [all_py27]     assert output == "This is the secret\n"

20:17:21 [all_py27] E   AssertionError: assert 'cat: read er...a directory\n' == 'This is the secret\n'

20:17:21 [all_py27] E     - cat: read error: Is a directory

20:17:21 [all_py27] E     + This is the secret

@dnephin
Copy link
Author

dnephin commented Jan 26, 2017

Oops, I didn't notice. I'll look into them

@dnephin
Copy link
Author

dnephin commented Jan 27, 2017

I fixed the TypeErrors, but the other test is passing locally.

From the failure it sounds like the file doesn't exist on the "host", so the bind mount is creating the path as a directory.

@dnephin dnephin force-pushed the secrets-using-bind-mounts branch 3 times, most recently from ae329ee to 5b40fe8 Compare January 30, 2017 20:42
@dnephin
Copy link
Author

dnephin commented Jan 30, 2017

ok, tests are fixed

Copy link

@shin- shin- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small change, otherwise LGTM

with open(filename, 'r') as fh:
content = fh.read()

print(content)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove debug statement?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, removed

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