From 53f08f40279ea082bc470e118caa7decd187a23a Mon Sep 17 00:00:00 2001 From: Roger Ng Date: Thu, 18 Jan 2024 01:17:33 +0000 Subject: [PATCH 1/2] Bump CockroachDB to 22.2.17 --- .github/workflows/{test.yaml => test_crdb.yaml} | 0 integration/cloudbuild/testbase/Dockerfile | 5 ++--- quota/crdbqm/common_test.go | 2 +- storage/crdb/common_test.go | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) rename .github/workflows/{test.yaml => test_crdb.yaml} (100%) diff --git a/.github/workflows/test.yaml b/.github/workflows/test_crdb.yaml similarity index 100% rename from .github/workflows/test.yaml rename to .github/workflows/test_crdb.yaml diff --git a/integration/cloudbuild/testbase/Dockerfile b/integration/cloudbuild/testbase/Dockerfile index 541c6fdb45..42afb8aae4 100644 --- a/integration/cloudbuild/testbase/Dockerfile +++ b/integration/cloudbuild/testbase/Dockerfile @@ -23,9 +23,8 @@ RUN apt-get update && apt-get install -y \ # Install golangci-lint. See docs at: https://golangci-lint.run/usage/install/. RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.1 -# Install CockroachDB, see https://www.cockroachlabs.com/docs/v22.1/install-cockroachdb-linux -RUN curl https://binaries.cockroachdb.com/cockroach-v22.1.11.linux-amd64.tgz | tar -xz && cp -i cockroach-v22.1.11.linux-amd64/cockroach /usr/local/bin/ - +# Install CockroachDB, see https://www.cockroachlabs.com/docs/v22.2/install-cockroachdb-linux +RUN curl https://binaries.cockroachdb.com/cockroach-v22.2.17.linux-amd64.tgz | tar -xz && cp -i cockroach-v22.2.17.linux-amd64/cockroach /usr/local/bin/ RUN mkdir protoc && \ (cd protoc && \ diff --git a/quota/crdbqm/common_test.go b/quota/crdbqm/common_test.go index f2dc0d89a0..1b4d4c04d9 100644 --- a/quota/crdbqm/common_test.go +++ b/quota/crdbqm/common_test.go @@ -24,7 +24,7 @@ import ( ) func TestMain(m *testing.M) { - ts, err := testserver.NewTestServer() + ts, err := testserver.NewTestServer(testserver.CustomVersionOpt("22.2.17")) if err != nil { klog.Errorf("Failed to start test server: %v", err) os.Exit(1) diff --git a/storage/crdb/common_test.go b/storage/crdb/common_test.go index 45dafc679d..421fa88435 100644 --- a/storage/crdb/common_test.go +++ b/storage/crdb/common_test.go @@ -43,7 +43,7 @@ func (db *testDBHandle) GetDB() *sql.DB { func TestMain(m *testing.M) { flag.Parse() - ts, err := testserver.NewTestServer(testserver.CustomVersionOpt("22.2.7")) + ts, err := testserver.NewTestServer(testserver.CustomVersionOpt("22.2.17")) if err != nil { klog.Exitf("Failed to start test server: %v", err) } From fb42c1675631b4546bf0708aafe61bb227384f10 Mon Sep 17 00:00:00 2001 From: Roger Ng Date: Thu, 18 Jan 2024 18:13:53 +0000 Subject: [PATCH 2/2] Add testserver.StoreOnDiskOpt() for crdb tests --- quota/crdbqm/common_test.go | 2 +- storage/crdb/common_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quota/crdbqm/common_test.go b/quota/crdbqm/common_test.go index 1b4d4c04d9..97e1068c96 100644 --- a/quota/crdbqm/common_test.go +++ b/quota/crdbqm/common_test.go @@ -24,7 +24,7 @@ import ( ) func TestMain(m *testing.M) { - ts, err := testserver.NewTestServer(testserver.CustomVersionOpt("22.2.17")) + ts, err := testserver.NewTestServer(testserver.CustomVersionOpt("22.2.17"), testserver.StoreOnDiskOpt()) if err != nil { klog.Errorf("Failed to start test server: %v", err) os.Exit(1) diff --git a/storage/crdb/common_test.go b/storage/crdb/common_test.go index 421fa88435..23b4f1ab14 100644 --- a/storage/crdb/common_test.go +++ b/storage/crdb/common_test.go @@ -43,7 +43,7 @@ func (db *testDBHandle) GetDB() *sql.DB { func TestMain(m *testing.M) { flag.Parse() - ts, err := testserver.NewTestServer(testserver.CustomVersionOpt("22.2.17")) + ts, err := testserver.NewTestServer(testserver.CustomVersionOpt("22.2.17"), testserver.StoreOnDiskOpt()) if err != nil { klog.Exitf("Failed to start test server: %v", err) }