1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #20929 from yongtang/19425-DockerSuite.TestBuildDockerignoringWildDirs

Optimize slow bottleneck test of DockerSuite.TestBuildDockerignoringWildDirs.
This commit is contained in:
Vincent Demeester 2016-03-04 09:47:56 +01:00
commit 5f7941e412

View file

@ -3694,30 +3694,25 @@ func (s *DockerSuite) TestBuildDockerignoringWildDirs(c *check.C) {
FROM busybox
COPY . /
#RUN sh -c "[[ -e /.dockerignore ]]"
RUN sh -c "[[ -e /Dockerfile ]]"
RUN sh -c "[[ ! -e /file0 ]]"
RUN sh -c "[[ ! -e /dir1/file0 ]]"
RUN sh -c "[[ ! -e /dir2/file0 ]]"
RUN sh -c "[[ ! -e /file1 ]]"
RUN sh -c "[[ ! -e /dir1/file1 ]]"
RUN sh -c "[[ ! -e /dir1/dir2/file1 ]]"
RUN sh -c "[[ ! -e /dir1/file2 ]]"
RUN sh -c "[[ -e /dir1/dir2/file2 ]]"
RUN sh -c "[[ ! -e /dir1/dir2/file4 ]]"
RUN sh -c "[[ ! -e /dir1/dir2/file5 ]]"
RUN sh -c "[[ ! -e /dir1/dir2/file6 ]]"
RUN sh -c "[[ ! -e /dir1/dir3/file7 ]]"
RUN sh -c "[[ ! -e /dir1/dir3/file8 ]]"
RUN sh -c "[[ -e /dir1/dir3 ]]"
RUN sh -c "[[ -e /dir1/dir4 ]]"
RUN sh -c "[[ ! -e 'dir1/dir5/fileAA' ]]"
RUN sh -c "[[ -e 'dir1/dir5/fileAB' ]]"
RUN sh -c "[[ -e 'dir1/dir5/fileB' ]]" # "." in pattern means nothing
RUN sh -c "[[ -e /Dockerfile ]] && \
[[ ! -e /file0 ]] && \
[[ ! -e /dir1/file0 ]] && \
[[ ! -e /dir2/file0 ]] && \
[[ ! -e /file1 ]] && \
[[ ! -e /dir1/file1 ]] && \
[[ ! -e /dir1/dir2/file1 ]] && \
[[ ! -e /dir1/file2 ]] && \
[[ -e /dir1/dir2/file2 ]] && \
[[ ! -e /dir1/dir2/file4 ]] && \
[[ ! -e /dir1/dir2/file5 ]] && \
[[ ! -e /dir1/dir2/file6 ]] && \
[[ ! -e /dir1/dir3/file7 ]] && \
[[ ! -e /dir1/dir3/file8 ]] && \
[[ -e /dir1/dir3 ]] && \
[[ -e /dir1/dir4 ]] && \
[[ ! -e 'dir1/dir5/fileAA' ]] && \
[[ -e 'dir1/dir5/fileAB' ]] && \
[[ -e 'dir1/dir5/fileB' ]]" # "." in pattern means nothing
RUN echo all done!`