Exemplo n.º 1
0
 def test_with_dockerignore(self, datadir: Path) -> None:
     df_root = datadir / "contexts" / "dockerignore"
     assert df_root.is_dir()
     got = {
         str(p.relative_to(df_root))
         for p in docker.get_context_files(df_root)
     }
     assert got == {"Dockerfile", ".dockerignore", ".file", "file"}
Exemplo n.º 2
0
 def test_complex_dockerignore(self, datadir: Path) -> None:
     df_root = datadir / "contexts" / "complex_dockerignore"
     assert df_root.is_dir()
     got = {
         str(p.relative_to(df_root))
         for p in docker.get_context_files(df_root)
     }
     assert got == {"a", "b", "c/file", "d/file"}
Exemplo n.º 3
0
 def test_basic(self, datadir) -> None:
     df_root = datadir / "contexts" / "basic"
     assert df_root.is_dir()
     got = {
         str(p.relative_to(df_root))
         for p in docker.get_context_files(df_root)
     }
     assert got == {
         "Dockerfile",
         "file",
         "a/file",
         "a/b/file",
         ".file",
         "a/.file",
         "a/b/.file",
     }