1
0
mirror of https://github.com/oskar456/dzonegit.git synced 2024-05-11 05:55:41 +00:00

Fix no reconfig command issued on zone file rename.

This commit is contained in:
Ondřej Caletka
2018-08-27 21:59:54 +02:00
parent a7d693253d
commit 9ad1e74a88
2 changed files with 12 additions and 2 deletions

View File

@ -340,9 +340,19 @@ def test_post_receive(git_dir):
"echo TEST >{}/test".format(codir),
])
dzonegit.post_receive(stdin)
dzonegit.post_receive(stdin) # Check coping with existing codir
assert codir.join("dummy.zone").check()
assert codir.join("test").read() == "TEST\n"
# Test reconfig after renaming the file
codir.join("test").write("")
subprocess.call(["git", "mv", "dummy.zone", "dummy.zone.old"])
subprocess.call(["git", "commit", "-m", "rename dummy zone"])
revisions = "{} {} refs/heads/master\n".format(
head,
dzonegit.get_head(),
)
stdin = StringIO(revisions)
dzonegit.post_receive(stdin)
assert codir.join("test").read() == "TEST\n"
def test_template_config(git_dir):