Initial pipelines server, CLI, TUI, and Go installation
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from pathlib import Path
|
||||
import tarfile
|
||||
import tempfile
|
||||
import unittest
|
||||
import package
|
||||
|
||||
|
||||
class PackageTests(unittest.TestCase):
|
||||
def test_source_archive_excludes_runtime_and_credentials(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
archive = package.package(directory, "test", "source")
|
||||
with tarfile.open(archive) as tar:
|
||||
names = tar.getnames()
|
||||
self.assertTrue(any(name.endswith("install.sh") for name in names))
|
||||
self.assertTrue(any(name.endswith("examples/anime-today.md") for name in names))
|
||||
self.assertFalse(any("/secrets/" in name or name.endswith(".db") or "/.env" in name or "/__pycache__/" in name for name in names))
|
||||
self.assertTrue(archive.with_suffix(archive.suffix + ".sha256").exists())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user