mirror of
https://github.com/Oxalide/vsphere-influxdb-go.git
synced 2023-10-10 11:36:51 +00:00
add vendoring with go dep
This commit is contained in:
15
vendor/github.com/influxdata/influxdb/releng/unit-tests/Dockerfile
generated
vendored
Normal file
15
vendor/github.com/influxdata/influxdb/releng/unit-tests/Dockerfile
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
ARG GO_VERSION
|
||||
FROM golang:${GO_VERSION}-alpine
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
jq \
|
||||
git
|
||||
|
||||
RUN go get -u github.com/jstemmer/go-junit-report && \
|
||||
mv /go/bin/go-junit-report /usr/bin/go-junit-report && \
|
||||
rm -rf /go/*
|
||||
|
||||
COPY fs/ /
|
||||
|
||||
ENTRYPOINT ["influxdb_prebuild_tests.bash"]
|
7
vendor/github.com/influxdata/influxdb/releng/unit-tests/fs/usr/local/bin/influxdb_prebuild_tests.bash
generated
vendored
Executable file
7
vendor/github.com/influxdata/influxdb/releng/unit-tests/fs/usr/local/bin/influxdb_prebuild_tests.bash
generated
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Extract tarball into GOPATH.
|
||||
tar xz -C "$GOPATH" -f /influxdb-src.tar.gz
|
||||
|
||||
cd "$GOPATH/src/github.com/influxdata/influxdb"
|
||||
go test -v ./... 2>&1 | tee /out/tests.log | go-junit-report > /out/influxdb.junit.xml
|
48
vendor/github.com/influxdata/influxdb/releng/unit-tests/run.bash
generated
vendored
Executable file
48
vendor/github.com/influxdata/influxdb/releng/unit-tests/run.bash
generated
vendored
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
function printHelp() {
|
||||
>&2 echo "USAGE: $0 -i PATH_TO_SOURCE_TARBALL -o OUTDIR
|
||||
|
||||
Runs unit tests for influxdb.
|
||||
|
||||
If the environment variable GO_NEXT is not empty, tests run with the 'next' version of Go.
|
||||
"
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
printHelp
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SRCDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SRCDIR/../_go_versions.sh"
|
||||
|
||||
OUTDIR=""
|
||||
TARBALL=""
|
||||
|
||||
while getopts hi:o: arg; do
|
||||
case "$arg" in
|
||||
h) printHelp; exit 1;;
|
||||
i) TARBALL="$OPTARG";;
|
||||
o) OUTDIR="$OPTARG";;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$TARBALL" ] || [ -z "$OUTDIR" ]; then
|
||||
printHelp
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$GO_NEXT" ]; then
|
||||
DOCKER_TAG=latest
|
||||
GO_VERSION="$GO_CURRENT_VERSION"
|
||||
else
|
||||
DOCKER_TAG=next
|
||||
GO_VERSION="$GO_NEXT_VERSION"
|
||||
fi
|
||||
docker build --build-arg "GO_VERSION=$GO_VERSION" -t influxdata/influxdb/releng/unit-tests:"$DOCKER_TAG" "$SRCDIR"
|
||||
|
||||
docker run --rm \
|
||||
--mount type=bind,source="$OUTDIR",destination=/out \
|
||||
--mount type=bind,source="$TARBALL",destination=/influxdb-src.tar.gz,ro=1 \
|
||||
influxdata/influxdb/releng/unit-tests:"$DOCKER_TAG"
|
Reference in New Issue
Block a user