From fc138f17d35f1a9b8fd8aff5088f73025f4c38db Mon Sep 17 00:00:00 2001 From: yamatcha Date: Wed, 9 Oct 2024 05:44:41 +0000 Subject: [PATCH] Migrate to Ginkgo v2 --- Makefile | 12 +-- api/v1beta2/backuppolicy_webhook_test.go | 2 +- api/v1beta2/mysqlcluster_webhook_test.go | 2 +- api/v1beta2/statefulset_webhhok_test.go | 2 +- api/v1beta2/webhook_suite_test.go | 4 +- backup/integration_test.go | 2 +- backup/suite_test.go | 4 +- clustering/manager_test.go | 4 +- clustering/suite_test.go | 4 +- controllers/mysqlcluster_controller_test.go | 111 +++++++++++--------- controllers/partition_controller_test.go | 2 +- controllers/pod_watcher_test.go | 2 +- controllers/suite_test.go | 12 ++- e2e/Makefile | 4 +- e2e/backup_gcs_test.go | 4 +- e2e/backup_test.go | 4 +- e2e/backup_tls_test.go | 4 +- e2e/backup_with_env_test.go | 4 +- e2e/failover_test.go | 4 +- e2e/failure_test.go | 4 +- e2e/lifecycle_test.go | 4 +- e2e/offline_test.go | 9 +- e2e/partition_test.go | 4 +- e2e/pvc_test.go | 4 +- e2e/replication_test.go | 4 +- e2e/stop_test.go | 4 +- e2e/suite_test.go | 2 +- e2e/upgrade_test.go | 4 +- go.mod | 7 +- go.sum | 35 +----- pkg/bkop/operator_test.go | 2 +- pkg/bkop/suite_test.go | 2 +- pkg/bucket/gcs_test.go | 2 +- pkg/bucket/s3_test.go | 2 +- pkg/bucket/suite_test.go | 2 +- pkg/dbop/gtid_test.go | 2 +- pkg/dbop/kill_test.go | 2 +- pkg/dbop/replication_test.go | 2 +- pkg/dbop/status_test.go | 2 +- pkg/dbop/suite_test.go | 2 +- 40 files changed, 138 insertions(+), 150 deletions(-) diff --git a/Makefile b/Makefile index 684344ac8..80175d763 100644 --- a/Makefile +++ b/Makefile @@ -93,25 +93,25 @@ envtest: setup-envtest source <($(SETUP_ENVTEST) use -p env); \ export MOCO_CHECK_INTERVAL=100ms; \ export MOCO_CLONE_WAIT_DURATION=100ms; \ - go test -v -count 1 -race ./clustering -ginkgo.progress -ginkgo.v -ginkgo.failFast + go test -v -count 1 -race ./clustering -ginkgo.randomize-all -ginkgo.v -ginkgo.fail-fast source <($(SETUP_ENVTEST) use -p env); \ export DEBUG_CONTROLLER=1; \ - go test -v -count 1 -race ./controllers -ginkgo.progress -ginkgo.v -ginkgo.failFast + go test -v -count 1 -race ./controllers -ginkgo.randomize-all -ginkgo.v -ginkgo.fail-fast source <($(SETUP_ENVTEST) use -p env); \ - go test -v -count 1 -race ./api/... -ginkgo.progress -ginkgo.v + go test -v -count 1 -race ./api/... -ginkgo.randomize-all -ginkgo.v source <($(SETUP_ENVTEST) use -p env); \ - go test -v -count 1 -race ./backup -ginkgo.progress -ginkgo.v -ginkgo.failFast + go test -v -count 1 -race ./backup -ginkgo.randomize-all -ginkgo.v -ginkgo.fail-fast .PHONY: test-dbop test-dbop: -docker network create test-moco - TEST_MYSQL=1 MYSQL_VERSION=$(MYSQL_VERSION) go test -v -count 1 -race ./pkg/dbop -ginkgo.v + TEST_MYSQL=1 MYSQL_VERSION=$(MYSQL_VERSION) go test -v -count 1 -race ./pkg/dbop -ginkgo.v -ginkgo.randomize-all .PHONY: test-bkop test-bkop: @if which mysqlsh; then : ; else echo 'Run "make setup" to prepare test tools.'; exit 1; fi -docker network create test-moco - TEST_MYSQL=1 MYSQL_VERSION=$(MYSQL_VERSION) go test -v -count 1 -race ./pkg/bkop -ginkgo.v -ginkgo.progress + TEST_MYSQL=1 MYSQL_VERSION=$(MYSQL_VERSION) go test -v -count 1 -race ./pkg/bkop -ginkgo.v -ginkgo.randomize-all .PHONY: test test: test-tools diff --git a/api/v1beta2/backuppolicy_webhook_test.go b/api/v1beta2/backuppolicy_webhook_test.go index 7eefb9ac2..b010e6f03 100644 --- a/api/v1beta2/backuppolicy_webhook_test.go +++ b/api/v1beta2/backuppolicy_webhook_test.go @@ -4,7 +4,7 @@ import ( "context" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" batchv1 "k8s.io/api/batch/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/api/v1beta2/mysqlcluster_webhook_test.go b/api/v1beta2/mysqlcluster_webhook_test.go index bd110c6f2..398af7691 100644 --- a/api/v1beta2/mysqlcluster_webhook_test.go +++ b/api/v1beta2/mysqlcluster_webhook_test.go @@ -5,7 +5,7 @@ import ( mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" "github.com/cybozu-go/moco/pkg/constants" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" diff --git a/api/v1beta2/statefulset_webhhok_test.go b/api/v1beta2/statefulset_webhhok_test.go index 02f3aff40..e78b64d2b 100644 --- a/api/v1beta2/statefulset_webhhok_test.go +++ b/api/v1beta2/statefulset_webhhok_test.go @@ -3,7 +3,7 @@ package v1beta2_test import ( "context" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/api/v1beta2/webhook_suite_test.go b/api/v1beta2/webhook_suite_test.go index 73317134d..65b1255ac 100644 --- a/api/v1beta2/webhook_suite_test.go +++ b/api/v1beta2/webhook_suite_test.go @@ -10,7 +10,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "go.uber.org/zap/zapcore" @@ -123,7 +123,7 @@ var _ = BeforeSuite(func() { return nil }).Should(Succeed()) -}, 60) +}) var _ = AfterSuite(func() { cancel() diff --git a/backup/integration_test.go b/backup/integration_test.go index 0dfdcc40c..5107c9271 100644 --- a/backup/integration_test.go +++ b/backup/integration_test.go @@ -10,7 +10,7 @@ import ( mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" "github.com/cybozu-go/moco/pkg/bkop" "github.com/cybozu-go/moco/pkg/constants" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" corev1ac "k8s.io/client-go/applyconfigurations/core/v1" diff --git a/backup/suite_test.go b/backup/suite_test.go index 1581c17b7..79ae676da 100644 --- a/backup/suite_test.go +++ b/backup/suite_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "go.uber.org/zap/zapcore" corev1 "k8s.io/api/core/v1" @@ -79,7 +79,7 @@ var _ = BeforeSuite(func() { err = k8sClient.Create(context.Background(), ns) Expect(err).NotTo(HaveOccurred()) -}, 60) +}) var _ = AfterSuite(func() { By("tearing down the test environment") diff --git a/clustering/manager_test.go b/clustering/manager_test.go index 76dff44e6..2e363a10b 100644 --- a/clustering/manager_test.go +++ b/clustering/manager_test.go @@ -12,7 +12,7 @@ import ( "github.com/cybozu-go/moco/pkg/event" "github.com/cybozu-go/moco/pkg/metrics" "github.com/go-logr/stdr" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/prometheus/client_golang/prometheus" corev1 "k8s.io/api/core/v1" @@ -145,7 +145,7 @@ var _ = Describe("manager", func() { time.Sleep(10 * time.Millisecond) }) JustAfterEach(func() { - if CurrentGinkgoTestDescription().Failed { + if CurrentSpecReport().Failed() { cluster, err := testGetCluster(ctx) if err == nil { enc := json.NewEncoder(os.Stdout) diff --git a/clustering/suite_test.go b/clustering/suite_test.go index 45cdd0399..0e91d967e 100644 --- a/clustering/suite_test.go +++ b/clustering/suite_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "go.uber.org/zap/zapcore" corev1 "k8s.io/api/core/v1" @@ -76,7 +76,7 @@ var _ = BeforeSuite(func() { mysqlPassword, err = password.NewMySQLPassword() Expect(err).NotTo(HaveOccurred()) -}, 60) +}) var _ = AfterSuite(func() { By("tearing down the test environment") diff --git a/controllers/mysqlcluster_controller_test.go b/controllers/mysqlcluster_controller_test.go index 7d0f886b0..70218d6be 100644 --- a/controllers/mysqlcluster_controller_test.go +++ b/controllers/mysqlcluster_controller_test.go @@ -9,7 +9,7 @@ import ( mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" "github.com/cybozu-go/moco/pkg/constants" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" batchv1 "k8s.io/api/batch/v1" @@ -64,6 +64,58 @@ func testNewMySQLCluster(ns string) *mocov1beta2.MySQLCluster { return cluster } +func testNewBackUpPolicy() *mocov1beta2.BackupPolicy { + bp := &mocov1beta2.BackupPolicy{} + bp.Namespace = "test" + bp.Name = "test-policy" + bp.Spec.ActiveDeadlineSeconds = ptr.To[int64](100) + bp.Spec.BackoffLimit = ptr.To[int32](1) + bp.Spec.ConcurrencyPolicy = batchv1.ForbidConcurrent + bp.Spec.StartingDeadlineSeconds = ptr.To[int64](10) + bp.Spec.Schedule = "*/5 * * * *" + bp.Spec.SuccessfulJobsHistoryLimit = ptr.To[int32](1) + bp.Spec.FailedJobsHistoryLimit = ptr.To[int32](2) + jc := &bp.Spec.JobConfig + jc.Threads = 3 + jc.ServiceAccountName = "foo" + jc.CPU = resource.NewQuantity(1, resource.DecimalSI) + jc.MaxCPU = resource.NewQuantity(4, resource.DecimalSI) + jc.Memory = resource.NewQuantity(1<<30, resource.DecimalSI) + jc.MaxMemory = resource.NewQuantity(10<<30, resource.DecimalSI) + jc.Env = []mocov1beta2.EnvVarApplyConfiguration{{Name: ptr.To[string]("TEST"), Value: ptr.To[string]("123")}} + jc.EnvFrom = []mocov1beta2.EnvFromSourceApplyConfiguration{ + { + ConfigMapRef: &corev1ac.ConfigMapEnvSourceApplyConfiguration{ + LocalObjectReferenceApplyConfiguration: corev1ac.LocalObjectReferenceApplyConfiguration{ + Name: ptr.To[string]("bucket-config"), + }, + }, + }, + } + jc.WorkVolume = mocov1beta2.VolumeSourceApplyConfiguration{ + EmptyDir: &corev1ac.EmptyDirVolumeSourceApplyConfiguration{}, + } + jc.Volumes = []mocov1beta2.VolumeApplyConfiguration{ + { + Name: ptr.To[string]("test"), + VolumeSourceApplyConfiguration: corev1ac.VolumeSourceApplyConfiguration{ + EmptyDir: &corev1ac.EmptyDirVolumeSourceApplyConfiguration{}, + }, + }, + } + jc.VolumeMounts = []mocov1beta2.VolumeMountApplyConfiguration{ + { + Name: ptr.To[string]("test"), + MountPath: ptr.To[string]("/path/to/dir"), + }, + } + jc.BucketConfig.BucketName = "mybucket" + jc.BucketConfig.EndpointURL = "https://foo.bar.baz" + jc.BucketConfig.Region = "us-east-1" + jc.BucketConfig.UsePathStyle = true + return bp +} + func testDeleteMySQLCluster(ctx context.Context, ns, name string) { cluster := &mocov1beta2.MySQLCluster{} cluster.Namespace = ns @@ -95,6 +147,8 @@ var _ = Describe("MySQLCluster reconciler", func() { } err = k8sClient.DeleteAllOf(ctx, &mocov1beta2.MySQLCluster{}, client.InNamespace("test")) Expect(err).NotTo(HaveOccurred()) + err = k8sClient.DeleteAllOf(ctx, &mocov1beta2.BackupPolicy{}, client.InNamespace("test")) + Expect(err).NotTo(HaveOccurred()) err = k8sClient.DeleteAllOf(ctx, &appsv1.StatefulSet{}, client.InNamespace("test")) Expect(err).NotTo(HaveOccurred()) err = k8sClient.DeleteAllOf(ctx, &corev1.Secret{}, client.InNamespace("test")) @@ -1251,54 +1305,7 @@ var _ = Describe("MySQLCluster reconciler", func() { Expect(err).NotTo(HaveOccurred()) By("creating a backup policy") - bp := &mocov1beta2.BackupPolicy{} - bp.Namespace = "test" - bp.Name = "test-policy" - bp.Spec.ActiveDeadlineSeconds = ptr.To[int64](100) - bp.Spec.BackoffLimit = ptr.To[int32](1) - bp.Spec.ConcurrencyPolicy = batchv1.ForbidConcurrent - bp.Spec.StartingDeadlineSeconds = ptr.To[int64](10) - bp.Spec.Schedule = "*/5 * * * *" - bp.Spec.SuccessfulJobsHistoryLimit = ptr.To[int32](1) - bp.Spec.FailedJobsHistoryLimit = ptr.To[int32](2) - jc := &bp.Spec.JobConfig - jc.Threads = 3 - jc.ServiceAccountName = "foo" - jc.CPU = resource.NewQuantity(1, resource.DecimalSI) - jc.MaxCPU = resource.NewQuantity(4, resource.DecimalSI) - jc.Memory = resource.NewQuantity(1<<30, resource.DecimalSI) - jc.MaxMemory = resource.NewQuantity(10<<30, resource.DecimalSI) - jc.Env = []mocov1beta2.EnvVarApplyConfiguration{{Name: ptr.To[string]("TEST"), Value: ptr.To[string]("123")}} - jc.EnvFrom = []mocov1beta2.EnvFromSourceApplyConfiguration{ - { - ConfigMapRef: &corev1ac.ConfigMapEnvSourceApplyConfiguration{ - LocalObjectReferenceApplyConfiguration: corev1ac.LocalObjectReferenceApplyConfiguration{ - Name: ptr.To[string]("bucket-config"), - }, - }, - }, - } - jc.WorkVolume = mocov1beta2.VolumeSourceApplyConfiguration{ - EmptyDir: &corev1ac.EmptyDirVolumeSourceApplyConfiguration{}, - } - jc.Volumes = []mocov1beta2.VolumeApplyConfiguration{ - { - Name: ptr.To[string]("test"), - VolumeSourceApplyConfiguration: corev1ac.VolumeSourceApplyConfiguration{ - EmptyDir: &corev1ac.EmptyDirVolumeSourceApplyConfiguration{}, - }, - }, - } - jc.VolumeMounts = []mocov1beta2.VolumeMountApplyConfiguration{ - { - Name: ptr.To[string]("test"), - MountPath: ptr.To[string]("/path/to/dir"), - }, - } - jc.BucketConfig.BucketName = "mybucket" - jc.BucketConfig.EndpointURL = "https://foo.bar.baz" - jc.BucketConfig.Region = "us-east-1" - jc.BucketConfig.UsePathStyle = true + bp := testNewBackUpPolicy() err = k8sClient.Create(ctx, bp) Expect(err).NotTo(HaveOccurred()) @@ -1386,7 +1393,7 @@ var _ = Describe("MySQLCluster reconciler", func() { bp.Spec.Schedule = "*/5 1 * * *" bp.Spec.SuccessfulJobsHistoryLimit = nil bp.Spec.FailedJobsHistoryLimit = nil - jc = &bp.Spec.JobConfig + jc := &bp.Spec.JobConfig jc.Threads = 1 jc.ServiceAccountName = "oof" jc.CPU = nil @@ -1658,6 +1665,10 @@ var _ = Describe("MySQLCluster reconciler", func() { err := k8sClient.Create(ctx, cluster) Expect(err).NotTo(HaveOccurred()) + bp := testNewBackUpPolicy() + err = k8sClient.Create(ctx, bp) + Expect(err).NotTo(HaveOccurred()) + var cj *batchv1.CronJob var pdb *policyv1.PodDisruptionBudget Eventually(func() error { diff --git a/controllers/partition_controller_test.go b/controllers/partition_controller_test.go index 3af505ed5..ac625f7fc 100644 --- a/controllers/partition_controller_test.go +++ b/controllers/partition_controller_test.go @@ -7,7 +7,7 @@ import ( "sort" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/controllers/pod_watcher_test.go b/controllers/pod_watcher_test.go index daf3abb11..69ac52b57 100644 --- a/controllers/pod_watcher_test.go +++ b/controllers/pod_watcher_test.go @@ -5,7 +5,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 53c8e5a2e..9a8cf2345 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -7,7 +7,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "go.uber.org/zap/zapcore" corev1 "k8s.io/api/core/v1" @@ -53,7 +53,13 @@ var _ = BeforeSuite(func() { } var err error - cfg, err = testEnv.Start() + done := make(chan interface{}) + go func() { + defer GinkgoRecover() + cfg, err = testEnv.Start() + close(done) + }() + Eventually(done).WithTimeout(time.Minute).Should(BeClosed()) Expect(err).NotTo(HaveOccurred()) Expect(cfg).NotTo(BeNil()) @@ -84,7 +90,7 @@ var _ = BeforeSuite(func() { err = k8sClient.Create(context.Background(), ns) Expect(err).NotTo(HaveOccurred()) -}, 60) +}) var _ = AfterSuite(func() { By("tearing down the test environment") diff --git a/e2e/Makefile b/e2e/Makefile index 07f609ce3..88a729cca 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -55,12 +55,12 @@ endif .PHONY: test test: env PATH="$$(pwd)/../bin:$$PATH" RUN_E2E=1 \ - go test -v -race -timeout 90m . -ginkgo.progress -ginkgo.v -ginkgo.failFast + go test -v -race -timeout 90m . -ginkgo.v -ginkgo.fail-fast -ginkgo.randomize-all -ginkgo.timeout 90m .PHONY: test-upgrade test-upgrade: env PATH=$$(pwd)/../bin:$$PATH RUN_E2E=1 UPGRADE=1 \ - go test -v -race -timeout 15m . -ginkgo.progress -ginkgo.v -ginkgo.failFast + go test -v -race -timeout 15m . -ginkgo.v -ginkgo.fail-fast -ginkgo.randomize-all .PHONY: logs logs: diff --git a/e2e/backup_gcs_test.go b/e2e/backup_gcs_test.go index c5900aeff..6355d048b 100644 --- a/e2e/backup_gcs_test.go +++ b/e2e/backup_gcs_test.go @@ -12,7 +12,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" @@ -25,7 +25,7 @@ var backupGCSYAML string //go:embed testdata/restore_gcs.yaml var restoreGCSYAML string -var _ = Context("backup-gcs", func() { +var _ = Context("backup-gcs", Ordered, func() { if doUpgrade { return } diff --git a/e2e/backup_test.go b/e2e/backup_test.go index 5ce649237..b6ad28d7d 100644 --- a/e2e/backup_test.go +++ b/e2e/backup_test.go @@ -10,7 +10,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" @@ -29,7 +29,7 @@ var restore1YAML string //go:embed testdata/restore2.yaml var restore2YAML string -var _ = Context("backup", func() { +var _ = Context("backup", Ordered, func() { if doUpgrade { return } diff --git a/e2e/backup_tls_test.go b/e2e/backup_tls_test.go index 15e23f71c..f77df7e49 100644 --- a/e2e/backup_tls_test.go +++ b/e2e/backup_tls_test.go @@ -10,7 +10,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" @@ -26,7 +26,7 @@ var backupTLSYAML string //go:embed testdata/restore_tls.yaml var restoreTLSYAML string -var _ = Context("backup-tls", func() { +var _ = Context("backup-tls", Ordered, func() { if doUpgrade { return } diff --git a/e2e/backup_with_env_test.go b/e2e/backup_with_env_test.go index 1c94c319a..bb78dbb1b 100644 --- a/e2e/backup_with_env_test.go +++ b/e2e/backup_with_env_test.go @@ -10,7 +10,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" @@ -23,7 +23,7 @@ var backupWithEnvYAML string //go:embed testdata/restore_with_env.yaml var restoreWithEnvYAML string -var _ = Context("backup with ObjectBucketName is set in environments variables", func() { +var _ = Context("backup with ObjectBucketName is set in environments variables", Ordered, func() { if doUpgrade { return } diff --git a/e2e/failover_test.go b/e2e/failover_test.go index 689083627..cadd97f30 100644 --- a/e2e/failover_test.go +++ b/e2e/failover_test.go @@ -6,7 +6,7 @@ import ( "fmt" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -14,7 +14,7 @@ import ( //go:embed testdata/failover.yaml var failoverYAML string -var _ = Context("failure", func() { +var _ = Context("failure", Ordered, func() { if doUpgrade { return } diff --git a/e2e/failure_test.go b/e2e/failure_test.go index cd5c94383..2cf1a3cbd 100644 --- a/e2e/failure_test.go +++ b/e2e/failure_test.go @@ -9,7 +9,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -17,7 +17,7 @@ import ( //go:embed testdata/failure.yaml var failureYAML string -var _ = Context("failure", func() { +var _ = Context("failure", Ordered, func() { if doUpgrade { return } diff --git a/e2e/lifecycle_test.go b/e2e/lifecycle_test.go index dd87434ec..7ea52941e 100644 --- a/e2e/lifecycle_test.go +++ b/e2e/lifecycle_test.go @@ -9,7 +9,7 @@ import ( "strings" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/prometheus/common/expfmt" appsv1 "k8s.io/api/apps/v1" @@ -21,7 +21,7 @@ import ( //go:embed testdata/single.yaml var singleYAML string -var _ = Context("lifecycle", func() { +var _ = Context("lifecycle", Ordered, func() { if doUpgrade { return } diff --git a/e2e/offline_test.go b/e2e/offline_test.go index 2e54fe4f7..7dee07b80 100644 --- a/e2e/offline_test.go +++ b/e2e/offline_test.go @@ -4,13 +4,14 @@ import ( _ "embed" "errors" "fmt" + "strconv" + "strings" + mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" "github.com/cybozu-go/moco/clustering" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "strconv" - "strings" ) //go:embed testdata/offline_test.yaml @@ -19,7 +20,7 @@ var offlineYAML string //go:embed testdata/offline_test_changed.yaml var offlineChangedYAML string -var _ = Context("offline", func() { +var _ = Context("offline", Ordered, func() { if doUpgrade { return } diff --git a/e2e/partition_test.go b/e2e/partition_test.go index ae5df56d7..a35f1d133 100644 --- a/e2e/partition_test.go +++ b/e2e/partition_test.go @@ -10,7 +10,7 @@ import ( "sort" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/prometheus/common/expfmt" appsv1 "k8s.io/api/apps/v1" @@ -37,7 +37,7 @@ var imagePullBackoffApplyYAML string //go:embed testdata/partition_volume_template.yaml var volumeTemplateApplyYAML string -var _ = Context("partition_test", func() { +var _ = Context("partition_test", Ordered, func() { if doUpgrade { return } diff --git a/e2e/pvc_test.go b/e2e/pvc_test.go index dae21a077..3cfd0d08b 100644 --- a/e2e/pvc_test.go +++ b/e2e/pvc_test.go @@ -10,7 +10,7 @@ import ( "strings" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/prometheus/common/expfmt" corev1 "k8s.io/api/core/v1" @@ -23,7 +23,7 @@ var pvcTestYAML string //go:embed testdata/pvc_test_changed.yaml var pvcApplyYAML string -var _ = Context("pvc_test", func() { +var _ = Context("pvc_test", Ordered, func() { if doUpgrade { return } diff --git a/e2e/replication_test.go b/e2e/replication_test.go index 148979bd2..facc45bd0 100644 --- a/e2e/replication_test.go +++ b/e2e/replication_test.go @@ -10,7 +10,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -22,7 +22,7 @@ var donorYAML string //go:embed testdata/replication.yaml var replYAML string -var _ = Context("replication", func() { +var _ = Context("replication", Ordered, func() { if doUpgrade { return } diff --git a/e2e/stop_test.go b/e2e/stop_test.go index 849c0eba2..6ad256302 100644 --- a/e2e/stop_test.go +++ b/e2e/stop_test.go @@ -10,7 +10,7 @@ import ( "time" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/prometheus/common/expfmt" appsv1 "k8s.io/api/apps/v1" @@ -25,7 +25,7 @@ var stopYAML string //go:embed testdata/stop_changed.yaml var stopChangedYAML string -var _ = Context("stop reconciliation and clustering", func() { +var _ = Context("stop reconciliation and clustering", Ordered, func() { if doUpgrade { return } diff --git a/e2e/suite_test.go b/e2e/suite_test.go index 2d4970faa..9ca246f6d 100644 --- a/e2e/suite_test.go +++ b/e2e/suite_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/e2e/upgrade_test.go b/e2e/upgrade_test.go index b83124544..0c5841838 100644 --- a/e2e/upgrade_test.go +++ b/e2e/upgrade_test.go @@ -8,7 +8,7 @@ import ( "strings" mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" @@ -23,7 +23,7 @@ const ( mysqlVersionNew = "8.4.2" ) -var _ = Context("upgrade", func() { +var _ = Context("upgrade", Ordered, func() { if !doUpgrade { return } diff --git a/go.mod b/go.mod index aa428d6fa..90e3a2960 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/go-sql-driver/mysql v1.8.1 github.com/google/go-cmp v0.6.0 github.com/jmoiron/sqlx v1.4.0 - github.com/onsi/ginkgo v1.16.5 + github.com/onsi/ginkgo/v2 v2.20.2 github.com/onsi/gomega v1.34.2 github.com/prometheus/client_golang v1.20.3 github.com/prometheus/client_model v0.6.1 @@ -79,12 +79,14 @@ require ( github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect github.com/google/s2a-go v0.1.8 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect @@ -108,7 +110,6 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - github.com/nxadm/tail v1.4.8 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect @@ -132,13 +133,13 @@ require ( golang.org/x/term v0.24.0 // indirect golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.6.0 // indirect + golang.org/x/tools v0.24.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.31.0 // indirect diff --git a/go.sum b/go.sum index dbdadc92f..f533d562a 100644 --- a/go.sum +++ b/go.sum @@ -100,8 +100,6 @@ github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8 github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= @@ -124,8 +122,6 @@ github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogB github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -143,7 +139,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= @@ -183,7 +178,6 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -234,17 +228,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo= -github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8= github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -280,7 +265,6 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -330,13 +314,11 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= @@ -352,15 +334,9 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -382,7 +358,6 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= @@ -428,15 +403,9 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pkg/bkop/operator_test.go b/pkg/bkop/operator_test.go index 535686352..d6054011c 100644 --- a/pkg/bkop/operator_test.go +++ b/pkg/bkop/operator_test.go @@ -13,7 +13,7 @@ import ( "github.com/cybozu-go/moco/pkg/password" "github.com/go-sql-driver/mysql" "github.com/jmoiron/sqlx" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/bkop/suite_test.go b/pkg/bkop/suite_test.go index 5f28487ce..05adbdf85 100644 --- a/pkg/bkop/suite_test.go +++ b/pkg/bkop/suite_test.go @@ -7,7 +7,7 @@ import ( "github.com/cybozu-go/moco/pkg/dbop" "github.com/go-logr/stdr" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/bucket/gcs_test.go b/pkg/bucket/gcs_test.go index 541c44937..21c7c3a8c 100644 --- a/pkg/bucket/gcs_test.go +++ b/pkg/bucket/gcs_test.go @@ -11,7 +11,7 @@ import ( "time" "cloud.google.com/go/storage" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "google.golang.org/api/option" ) diff --git a/pkg/bucket/s3_test.go b/pkg/bucket/s3_test.go index f4fa1e45f..49a5bd2d0 100644 --- a/pkg/bucket/s3_test.go +++ b/pkg/bucket/s3_test.go @@ -14,7 +14,7 @@ import ( "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/service/s3" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/bucket/suite_test.go b/pkg/bucket/suite_test.go index a8444423f..995b5eadc 100644 --- a/pkg/bucket/suite_test.go +++ b/pkg/bucket/suite_test.go @@ -3,7 +3,7 @@ package bucket import ( "testing" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/dbop/gtid_test.go b/pkg/dbop/gtid_test.go index fb040136b..6b2f02ee1 100644 --- a/pkg/dbop/gtid_test.go +++ b/pkg/dbop/gtid_test.go @@ -5,7 +5,7 @@ import ( mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" "github.com/cybozu-go/moco/pkg/password" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/dbop/kill_test.go b/pkg/dbop/kill_test.go index 903e79220..fc7aedb61 100644 --- a/pkg/dbop/kill_test.go +++ b/pkg/dbop/kill_test.go @@ -7,7 +7,7 @@ import ( mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" "github.com/cybozu-go/moco/pkg/constants" "github.com/cybozu-go/moco/pkg/password" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/dbop/replication_test.go b/pkg/dbop/replication_test.go index 15da1c37c..bde5a2bee 100644 --- a/pkg/dbop/replication_test.go +++ b/pkg/dbop/replication_test.go @@ -7,7 +7,7 @@ import ( mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" "github.com/cybozu-go/moco/pkg/constants" "github.com/cybozu-go/moco/pkg/password" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/dbop/status_test.go b/pkg/dbop/status_test.go index e6efe82bc..344ae5caf 100644 --- a/pkg/dbop/status_test.go +++ b/pkg/dbop/status_test.go @@ -5,7 +5,7 @@ import ( mocov1beta2 "github.com/cybozu-go/moco/api/v1beta2" "github.com/cybozu-go/moco/pkg/password" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/dbop/suite_test.go b/pkg/dbop/suite_test.go index e29e4d93b..10bf2cf7c 100644 --- a/pkg/dbop/suite_test.go +++ b/pkg/dbop/suite_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/go-logr/stdr" - . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" )