Publish snippets and Markdown posts through authenticated uploads
This commit is contained in:
@@ -15,12 +15,14 @@ class DeploymentTests(unittest.TestCase):
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
root = Path(folder)
|
||||
(root / '_site/art').mkdir(parents=True)
|
||||
(root / '_site/snippets').mkdir(parents=True)
|
||||
job = 'a' * 64
|
||||
(root / '_site/art/index.html').write_text(f'<div id="photo-{job}"></div>')
|
||||
(root / '_site/snippets/index.html').write_text(f'<div id="snippet-{job}"></div>')
|
||||
subprocess.run(['python3', str(ROOT / 'scripts/photo-manifest.py')], cwd=root,
|
||||
env=dict(os.environ, GITHUB_SHA='b' * 40), check=True)
|
||||
self.assertEqual(json.loads((root / '_site/photo-publication.json').read_text()),
|
||||
{'commit': 'b' * 40, 'photos': [job]})
|
||||
{'commit': 'b' * 40, 'photos': [job], 'snippets': [job], 'posts': []})
|
||||
|
||||
@unittest.skipUnless(platform.system() == 'Linux', 'Production activation uses GNU mv and flock')
|
||||
def test_activation_failure_and_stale_workflow(self):
|
||||
|
||||
Reference in New Issue
Block a user