Avoid erroring when processing emails again

These changes allow processing emails again, and just creating job and branch
entries where data is missing.
This commit is contained in:
Christopher Baines 2019-08-05 20:59:48 +01:00
parent 712dd377a1
commit 9e80bda4f9
7 changed files with 84 additions and 5 deletions

View file

@ -22,6 +22,25 @@
id
(current-date)))
#t)
#:always-rollback? #t))
(test-assert "insert-git-branch-entry works twice"
(with-postgresql-transaction
conn
(lambda (conn)
(let* ((url "test-url")
(id (git-repository-url->git-repository-id conn url)))
(insert-git-branch-entry conn
"master"
"test-commit"
id
(current-date))
(insert-git-branch-entry conn
"master"
"test-commit"
id
(current-date)))
#t)
#:always-rollback? #t))))
(test-end)