File: integration

package info (click to toggle)
etcd 3.5.16-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,876 kB
  • sloc: sh: 3,136; makefile: 477
file content (35 lines) | stat: -rwxr-xr-x 1,450 bytes parent folder | download | duplicates (5)
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

export DH_VERBOSE=1

set -ex

# ensure no other etcd server is running
invoke-rc.d etcd stop || true
pkill -9 etcd || true

DH_GOLANG_INSTALL_EXTRA="$(find . -name fixtures-expired) $(find . -name fixtures) $(find . -name go.mod) etcd.conf.yml.sample" \
	dh_auto_configure -O--buildsystem=golang -O--builddirectory=_build
BINDIR=_build/src/go.etcd.io/etcd/bin
mkdir -p $BINDIR
ln -sf /usr/bin/etcdctl $BINDIR/etcdctl
ln -sf /usr/bin/etcdutl $BINDIR/etcdutl
ln -sf /usr/bin/etcd $BINDIR/etcd

# Following doesn't work, since it expects the two have same major.minor version.
# download old etcd-server for upgrading tests.
# the tests are skipped if no etcd-last-release binary.
# see tests/e2e/etcd_release_upgrade_test.go
# apt-get download etcd-server/"$(lsb_release -sc)" || true
# dpkg-deb --fsys-tarfile etcd-server_*.deb | tar -x --transform='s|.*|etcd-last-release|g' \
# 	-C $BINDIR ./usr/bin/etcd || true

# patch out potential port conflicts
sed -i 's,localhost:2380,localhost:5380,g; s,localhost:2379,localhost:5378,g;' \
	_build/src/go.etcd.io/etcd/etcd.conf.yml.sample
mkdir --mode=700 -v "_build/src/go.etcd.io/etcd/tests/e2e/default.etcd"
mkdir -vp "_build/src/go.etcd.io/etcd/tests/e2e/default.etcd/member/wal"

INTEGRATION_TEST=(tests/integration/... tests/e2e/...)
DH_GOLANG_BUILDPKG="${INTEGRATION_TEST[*]/#/go.etcd.io/etcd/}" \
	dh_auto_test -O--buildsystem=golang -O--builddirectory=_build -- -run=Test -timeout=30m