summaryrefslogtreecommitdiff
path: root/tests/tests/clone-skew
blob: dd51acde69897048b5b98df012776c33f5226009 (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
31
32
33
34
35
#!/bin/bash
set -e
. tests/lib

t-dependencies libhttp-server-simple-static-perl

$troot/http-static-server >$tmp/must-clean/mirror.port $tmp/mirror
read <$tmp/must-clean/mirror.port mirror_port

t-git-config --global dgit-distro.test-dummy.mirror \
	http://127.0.0.1:$mirror_port/

t_archive_ln_s=cp

t-archive example 1.0-1
t-git-none

perl -i -ne '
	print or die $!;
	s/1.0-1/1.0-1+0.1/g;
	s/ \w/ sprintf " %x", $& ^ 1 /e;
	print or die $!;
' $tmp/aq/package.sid.$p
t-aq-archive-updated sid $p

LC_MESSAGES=C \
t-dgit clone $p 2>&1 |tee got.message

grep 'Warning: archive skew detected.'       got.message
egrep 'We were able to obtain only  *1.0-1$' got.message

cd $p
t-cloned-fetched-good

t-ok