Add 'docker' tag to build rules for Elasticsearch tests
Split ElasticReindexIT out to its own rule with the labels 'docker' and 'elastic'. Add a 'docker' label on the Elasticsearch query tests. This will allow to exclude all the tests that require docker: bazel test --test_tag_filters=-docker //... Currently only the Elasticsearch related tests use docker, so the same could be achieved by excluding the 'elastic' tag, however it is possible that in future we will add more tests that use different docker containers. Change-Id: Ia67835d96c5863a14a060505f1aece7f4b39a12b
This commit is contained in:
@@ -239,6 +239,12 @@ To exclude tests that have been marked as flaky:
|
||||
bazel test --test_tag_filters=-flaky //...
|
||||
----
|
||||
|
||||
To exclude tests that require a Docker host:
|
||||
|
||||
----
|
||||
bazel test --test_tag_filters=-docker //...
|
||||
----
|
||||
|
||||
To ignore cached test results:
|
||||
|
||||
----
|
||||
|
@@ -1,7 +1,23 @@
|
||||
load("//gerrit-acceptance-tests:tests.bzl", "acceptance_tests")
|
||||
|
||||
acceptance_tests(
|
||||
srcs = glob(["*IT.java"]),
|
||||
srcs = glob(
|
||||
["*IT.java"],
|
||||
exclude = ["ElasticReindexIT.java"],
|
||||
),
|
||||
group = "pgm",
|
||||
labels = ["pgm"],
|
||||
)
|
||||
|
||||
acceptance_tests(
|
||||
srcs = [
|
||||
"AbstractReindexIT.java",
|
||||
"ElasticReindexIT.java",
|
||||
],
|
||||
group = "elastic",
|
||||
labels = [
|
||||
"docker",
|
||||
"elastic",
|
||||
"pgm",
|
||||
],
|
||||
)
|
||||
|
@@ -52,6 +52,7 @@ junit_tests(
|
||||
size = "large",
|
||||
srcs = glob(["src/test/java/**/*Test.java"]),
|
||||
tags = [
|
||||
"docker",
|
||||
"elastic",
|
||||
],
|
||||
deps = [
|
||||
|
Reference in New Issue
Block a user