From b65a4a87139c45db74d377d91df6a5fbb88b4f91 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Tue, 9 Jun 2015 10:46:18 +0800 Subject: [PATCH] Ensure that rados is disabled without build tag This ensures that rados is not required when building the registry. This was slightly tricky in that when the flags were applied, the rados package was completely missing. This led to a problem where rados was basically unlistable and untestable as a package. This was fixed by simply adding a doc.go file that is included whether rados is built or not. Signed-off-by: Stephen J Day --- circle.yml | 3 +-- registry/storage/driver/rados/doc.go | 3 +++ registry/storage/driver/rados/rados.go | 2 ++ registry/storage/driver/rados/rados_test.go | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 registry/storage/driver/rados/doc.go diff --git a/circle.yml b/circle.yml index d8e996d7..e43ecb66 100644 --- a/circle.yml +++ b/circle.yml @@ -102,8 +102,7 @@ test: - echo "$CIRCLE_PAIN" > ~/goverage.report - gvm use stable; go list ./... | xargs -L 1 -I{} rm -f $GOPATH/src/{}/coverage.out: pwd: $BASE_STABLE - - - gvm use stable; go list ./... | xargs -L 1 -I{} godep go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/{}/coverage.out {}: + - gvm use stable; go list -tags "$DOCKER_BUILDTAGS" ./... | xargs -L 1 -I{} godep go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/{}/coverage.out {}: timeout: 600 pwd: $BASE_STABLE diff --git a/registry/storage/driver/rados/doc.go b/registry/storage/driver/rados/doc.go new file mode 100644 index 00000000..655c68a3 --- /dev/null +++ b/registry/storage/driver/rados/doc.go @@ -0,0 +1,3 @@ +// Package rados implements the rados storage driver backend. Support can be +// enabled by including the "include_rados" build tag. +package rados diff --git a/registry/storage/driver/rados/rados.go b/registry/storage/driver/rados/rados.go index 9bac8fc3..0ea10a89 100644 --- a/registry/storage/driver/rados/rados.go +++ b/registry/storage/driver/rados/rados.go @@ -1,3 +1,5 @@ +// +build include_rados + package rados import ( diff --git a/registry/storage/driver/rados/rados_test.go b/registry/storage/driver/rados/rados_test.go index 29486e89..d408519b 100644 --- a/registry/storage/driver/rados/rados_test.go +++ b/registry/storage/driver/rados/rados_test.go @@ -1,3 +1,5 @@ +// +build include_rados + package rados import (