mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
test: Add TLS tracking integration test
This patch adds a new test, which verifies the TLS tracking. Because we need to simulate SPF records, and Go does not support fully intercepting DNS lookups yet, this test relies on dnsmasq to provide a DNS resolver. In the future, once Go supports DNS lookup interception, we can get rid of this additional dependency.
This commit is contained in:
@@ -11,7 +11,7 @@ function init() {
|
||||
cd ${TBASE}
|
||||
|
||||
if [ "${RACE}" == "1" ]; then
|
||||
RACE="-race"
|
||||
GOFLAGS="$GOFLAGS -race"
|
||||
fi
|
||||
|
||||
# Remove the directory where test-mda will deliver mail, so previous
|
||||
@@ -30,7 +30,7 @@ function chasquid() {
|
||||
return
|
||||
fi
|
||||
|
||||
( cd ${TBASE}/../../; go build ${RACE} . )
|
||||
( cd ${TBASE}/../../; go build $GOFLAGS -tags="$GOTAGS" . )
|
||||
|
||||
# HOSTALIASES: so we "fake" hostnames.
|
||||
# PATH: so chasquid can call test-mda without path issues.
|
||||
@@ -45,7 +45,8 @@ function chasquid_cover() {
|
||||
# Build the coverage-enabled binary.
|
||||
# See coverage_test.go for more details.
|
||||
( cd ${TBASE}/../../;
|
||||
go test -covermode=count -coverpkg=./... -c -tags coveragebin )
|
||||
go test -covermode=count -coverpkg=./... -c \
|
||||
-tags="coveragebin $GOTAGS" $GOFLAGS )
|
||||
|
||||
# Run the coverage-enabled binary, named "chasquid.test" for hacky
|
||||
# reasons. See the chasquid function above for details on the
|
||||
|
||||
Reference in New Issue
Block a user