summaryrefslogtreecommitdiff
path: root/tests/tests/push-newpackage
blob: d0f3f35a40d9927af72afb01fd3aa5c729836046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e
. tests/lib

t-prep-newpackage pari-extra 3-1

cd $p
t-refs-same-start
t-ref-head

t-expect-push-fail 'package appears to be new in this suite' \
t-dgit push

t-dgit build

git checkout bogus

set +e
(set -e; DGIT_TEST_DEBUG=' ' t-dgit push --new)
rc=$?
set -e
if [ $rc = 0 ]; then fail "push succeeded when tree mismatch"; fi

git checkout master

t-dgit push --new

t-pushed-good master

echo ok.