Skip to content

Commit

Permalink
Merge pull request #2744 from justinsb/add_e2e_bigquery
Browse files Browse the repository at this point in the history
tests: add new CI test runs for bigquery
  • Loading branch information
google-oss-prow[bot] authored Oct 19, 2024
2 parents e3bbfc6 + 91e6a43 commit a7620cd
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 15 deletions.
25 changes: 25 additions & 0 deletions dev/ci/periodics/e2e-service-bigquery
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUPS=bigquery.cnrm.cloud.google.com,bigqueryconnection.cnrm.cloud.google.com,bigquerydatatransfer.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion dev/ci/periodics/e2e-service-cloudkms
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUP=kms.cnrm.cloud.google.com
export ONLY_TEST_APIGROUPS=kms.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion dev/ci/periodics/e2e-service-dataflow
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUP=dataflow.cnrm.cloud.google.com
export ONLY_TEST_APIGROUPS=dataflow.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion dev/ci/periodics/e2e-service-logging
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUP=logging.cnrm.cloud.google.com
export ONLY_TEST_APIGROUPS=logging.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion dev/ci/periodics/e2e-service-monitoring
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUP=monitoring.cnrm.cloud.google.com
export ONLY_TEST_APIGROUPS=monitoring.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion dev/ci/periodics/e2e-service-pubsub
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUP=pubsub.cnrm.cloud.google.com
export ONLY_TEST_APIGROUPS=pubsub.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion dev/ci/periodics/e2e-service-redis
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUP=redis.cnrm.cloud.google.com
export ONLY_TEST_APIGROUPS=redis.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion dev/ci/periodics/e2e-service-securesourcemanager
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUP=securesourcemanager.cnrm.cloud.google.com
export ONLY_TEST_APIGROUPS=securesourcemanager.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion dev/ci/periodics/e2e-service-sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}

export ONLY_TEST_APIGROUP=sql.cnrm.cloud.google.com
export ONLY_TEST_APIGROUPS=sql.cnrm.cloud.google.com

dev/ci/periodics/_create_project_and_run_e2e
2 changes: 1 addition & 1 deletion scripts/github-actions/tests-e2e-fixtures-compute
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}/

export ONLY_TEST_APIGROUP="compute.cnrm.cloud.google.com"
export ONLY_TEST_APIGROUPS="compute.cnrm.cloud.google.com"

${REPO_ROOT}/dev/tasks/run-e2e
2 changes: 1 addition & 1 deletion scripts/github-actions/tests-e2e-fixtures-gkehub
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ set -o pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd ${REPO_ROOT}/

export ONLY_TEST_APIGROUP="gkehub.cnrm.cloud.google.com"
export ONLY_TEST_APIGROUPS="gkehub.cnrm.cloud.google.com"

${REPO_ROOT}/dev/tasks/run-e2e
11 changes: 6 additions & 5 deletions tests/e2e/unified_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func TestAllInSeries(t *testing.T) {
{
dummySample := create.LoadSample(t, sampleKey, testgcp.GCPProject{ProjectID: "test-skip", ProjectNumber: 123456789})
create.MaybeSkip(t, sampleKey.Name, dummySample.Resources)
if s := os.Getenv("ONLY_TEST_APIGROUP"); s != "" {
t.Skipf("skipping test because cannot determine group for samples, with ONLY_TEST_APIGROUP=%s", s)
if s := os.Getenv("ONLY_TEST_APIGROUPS"); s != "" {
t.Skipf("skipping test because cannot determine group for samples, with ONLY_TEST_APIGROUPS=%s", s)
}
}

Expand Down Expand Up @@ -157,9 +157,10 @@ func testFixturesInSeries(ctx context.Context, t *testing.T, testPause bool, can
continue
}
}
if s := os.Getenv("ONLY_TEST_APIGROUP"); s != "" {
if group != s {
klog.Infof("skipping test %s because group %q did not match ONLY_TEST_APIGROUP=%s", fixture.Name, group, s)
if s := os.Getenv("ONLY_TEST_APIGROUPS"); s != "" {
groups := strings.Split(s, ",")
if !slice.StringSliceContains(groups, group) {
klog.Infof("skipping test %s because group %q did not match ONLY_TEST_APIGROUPS=%s", fixture.Name, group, s)
continue
}
}
Expand Down

0 comments on commit a7620cd

Please sign in to comment.