Only test the prometheuscollector on supported versions

This commit is contained in:
Acconut 2019-01-14 00:22:12 +01:00
parent 204044e4b9
commit 05f79b33ac
1 changed files with 6 additions and 3 deletions

View File

@ -21,9 +21,13 @@ if [[ "$goversion" == *"go1.5"* ]] ||
echo "Skipping tests requiring GCSStore, which is not supported on $goversion" echo "Skipping tests requiring GCSStore, which is not supported on $goversion"
packages=$(echo "$packages" | sed '/gcsstore/d') packages=$(echo "$packages" | sed '/gcsstore/d')
echo "Skipping tests requiring Prometheus, which is not supported on $goversion"
packages=$(echo "$packages" | sed '/prometheuscollector/d')
else else
# Install the Consul packages which are not vendored. # Install the Consul and Prometheus client packages which are not vendored.
go get -u github.com/hashicorp/consul/... go get -u github.com/hashicorp/consul/...
go get -u github.com/prometheus/client_golang/prometheus
fi fi
install_etcd_pkgs() { install_etcd_pkgs() {
@ -48,9 +52,8 @@ else
install_etcd_pkgs install_etcd_pkgs
fi fi
# Install the AWS SDK and Prometheus client which is explicitly not vendored # Install the AWS SDK which is explicitly not vendored
go get -u github.com/aws/aws-sdk-go/... go get -u github.com/aws/aws-sdk-go/...
go get -u github.com/prometheus/client_golang/prometheus
# Test all packages which are allowed on all Go versions # Test all packages which are allowed on all Go versions
go test $packages go test $packages