Fix log message and test script

This commit is contained in:
Daniel 2021-04-19 14:40:04 +02:00
parent edd0d6e834
commit efdc0b7849
2 changed files with 5 additions and 2 deletions

View file

@ -181,7 +181,7 @@ func (q *Queue) packetHandler(ctx context.Context) func(nfqueue.Attribute) int {
if attrs.Payload == nil { if attrs.Payload == nil {
// There is not payload. // There is not payload.
log.Warningf("nfqueue: packet #%s has no payload", pkt.pktID) log.Warningf("nfqueue: packet #%d has no payload", pkt.pktID)
return 0 return 0
} }

5
test
View file

@ -176,13 +176,16 @@ echo "running tests for ${platformInfo//$'\n'/ }:"
# run vet/test on packages # run vet/test on packages
for package in $packages; do for package in $packages; do
package=${package#github.com/safing/portmaster}
package=${package#/}
package=$PWD/$package
echo "" echo ""
echo $package echo $package
if [[ $testonly -eq 0 ]]; then if [[ $testonly -eq 0 ]]; then
checkformat $package checkformat $package
run golint -set_exit_status -min_confidence 1.0 $package run golint -set_exit_status -min_confidence 1.0 $package
run go vet $package run go vet $package
run golangci-lint run $GOPATH/src/$package run golangci-lint run $package
fi fi
run go test -cover $fullTestFlags $package run go test -cover $fullTestFlags $package
done done