diff options
author | Joffrey F <joffrey@docker.com> | 2018-03-05 11:49:43 -0800 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2018-03-05 11:49:43 -0800 |
commit | 13609359acfc33c42bda35ad240c4a8d96df13d4 (patch) | |
tree | 57dc50d4dc906af1bf650ac08f1c2a7b72847462 | |
parent | 74586cdd4c661ecc4a3e3bd64fafedde7f121d5e (diff) | |
download | docker-py-13609359acfc33c42bda35ad240c4a8d96df13d4.tar.gz |
Improve dockerignore comment test
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r-- | tests/integration/api_build_test.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/integration/api_build_test.py b/tests/integration/api_build_test.py index ad5fbaa..ce587d5 100644 --- a/tests/integration/api_build_test.py +++ b/tests/integration/api_build_test.py @@ -62,12 +62,15 @@ class BuildTest(BaseAPIIntegrationTest): '.dockerignore', '!ignored/subdir/excepted-file', '', # empty line, - '#', # comment line + '#*', # comment line ])) with open(os.path.join(base_dir, 'not-ignored'), 'w') as f: f.write("this file should not be ignored") + with open(os.path.join(base_dir, '#file.txt'), 'w') as f: + f.write('this file should not be ignored') + subdir = os.path.join(base_dir, 'ignored', 'subdir') os.makedirs(subdir) with open(os.path.join(subdir, 'file'), 'w') as f: @@ -93,6 +96,7 @@ class BuildTest(BaseAPIIntegrationTest): logs = logs.decode('utf-8') assert sorted(list(filter(None, logs.split('\n')))) == sorted([ + '/test/#file.txt', '/test/ignored/subdir/excepted-file', '/test/not-ignored' ]) |