Skip to content

Bump github.com/onsi/ginkgo from 1.15.2 to 1.16.0 #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 75 additions & 71 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,83 +70,87 @@ func TestAPIs(t *testing.T) {
[]Reporter{printer.NewlineReporter{}})
}

var _ = BeforeSuite(func(done Done) {
defer close(done)

By("bootstrapping test environment")

// Create test env for ctrl cluster and start it
ctrlClusterTestEnv = &envtest.Environment{
// Path to CRD from this project
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
}
ctrlClusterCfg = startTestEnv(ctrlClusterTestEnv)

// Create test env for svc cluster and start it
svcClusterTestEnv = &envtest.Environment{
CRDInstallOptions: envtest.CRDInstallOptions{
Paths: []string{
filepath.Join(HelmCRDDir, "postgresql.yaml"),
filepath.Join(externalYAMLDirTest, "crd-clusterwidenetworkpolicy.yaml"),
var _ = BeforeSuite(func() {
done := make(chan interface{})
go func() {
defer close(done)

By("bootstrapping test environment")

// Create test env for ctrl cluster and start it
ctrlClusterTestEnv = &envtest.Environment{
// Path to CRD from this project
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
}
ctrlClusterCfg = startTestEnv(ctrlClusterTestEnv)

// Create test env for svc cluster and start it
svcClusterTestEnv = &envtest.Environment{
CRDInstallOptions: envtest.CRDInstallOptions{
Paths: []string{
filepath.Join(HelmCRDDir, "postgresql.yaml"),
filepath.Join(externalYAMLDirTest, "crd-clusterwidenetworkpolicy.yaml"),
},
},
},
}
svcClusterCfg = startTestEnv(svcClusterTestEnv)
}
svcClusterCfg = startTestEnv(svcClusterTestEnv)

scheme := newScheme()
ctrlClusterMgr, err := cr.NewManager(ctrlClusterCfg, cr.Options{Scheme: scheme})
Expect(err).ToNot(HaveOccurred())
Expect(ctrlClusterMgr).ToNot(BeNil())
scheme := newScheme()
ctrlClusterMgr, err := cr.NewManager(ctrlClusterCfg, cr.Options{Scheme: scheme})
Expect(err).ToNot(HaveOccurred())
Expect(ctrlClusterMgr).ToNot(BeNil())

svcClusterMgr, err := cr.NewManager(svcClusterCfg, cr.Options{
MetricsBindAddress: "0",
Scheme: scheme,
})
Expect(err).ToNot(HaveOccurred())
Expect(svcClusterMgr).ToNot(BeNil())
svcClusterMgr, err := cr.NewManager(svcClusterCfg, cr.Options{
MetricsBindAddress: "0",
Scheme: scheme,
})
Expect(err).ToNot(HaveOccurred())
Expect(svcClusterMgr).ToNot(BeNil())

cr.SetLogger(zap.New(zap.UseDevMode(true)))
cr.SetLogger(zap.New(zap.UseDevMode(true)))

// Todo: OperatorManager should be a reconciler
opMgr, err := operatormanager.New(
svcClusterCfg,
filepath.Join(externalYAMLDir, "svc-postgres-operator.yaml"),
scheme,
cr.Log.WithName("OperatorManager"),
"test-psp")
Expect(err).ToNot(HaveOccurred())
// Todo: OperatorManager should be a reconciler
opMgr, err := operatormanager.New(
svcClusterCfg,
filepath.Join(externalYAMLDir, "svc-postgres-operator.yaml"),
scheme,
cr.Log.WithName("OperatorManager"),
"test-psp")
Expect(err).ToNot(HaveOccurred())

Expect((&PostgresReconciler{
CtrlClient: ctrlClusterMgr.GetClient(),
SvcClient: svcClusterMgr.GetClient(),
PartitionID: "sample-partition",
Tenant: "sample-tenant",
OperatorManager: opMgr,
LBManager: lbmanager.New(svcClusterMgr.GetClient(), "127.0.0.1", int32(32000), int32(8000)),
Log: cr.Log.WithName("controllers").WithName("Postgres"),
}).SetupWithManager(ctrlClusterMgr)).Should(Succeed())

go startMgr(ctrlClusterMgr)

ctrlClusterClient = ctrlClusterMgr.GetClient()
Expect(ctrlClusterClient).ToNot(BeNil())

Expect((&StatusReconciler{
CtrlClient: ctrlClusterMgr.GetClient(),
SvcClient: svcClusterMgr.GetClient(),
Log: cr.Log.WithName("controllers").WithName("Status"),
}).SetupWithManager(svcClusterMgr)).Should(Succeed())

go startMgr(svcClusterMgr)

svcClusterClient = svcClusterMgr.GetClient()
Expect(svcClusterClient).ToNot(BeNil())

createNamespace(svcClusterClient, "firewall")
createPostgresTestInstance()
createConfigMapSidecarConfig()
createCredentialSecrets()
}, 1000)
Expect((&PostgresReconciler{
CtrlClient: ctrlClusterMgr.GetClient(),
SvcClient: svcClusterMgr.GetClient(),
PartitionID: "sample-partition",
Tenant: "sample-tenant",
OperatorManager: opMgr,
LBManager: lbmanager.New(svcClusterMgr.GetClient(), "127.0.0.1", int32(32000), int32(8000)),
Log: cr.Log.WithName("controllers").WithName("Postgres"),
}).SetupWithManager(ctrlClusterMgr)).Should(Succeed())

go startMgr(ctrlClusterMgr)

ctrlClusterClient = ctrlClusterMgr.GetClient()
Expect(ctrlClusterClient).ToNot(BeNil())

Expect((&StatusReconciler{
CtrlClient: ctrlClusterMgr.GetClient(),
SvcClient: svcClusterMgr.GetClient(),
Log: cr.Log.WithName("controllers").WithName("Status"),
}).SetupWithManager(svcClusterMgr)).Should(Succeed())

go startMgr(svcClusterMgr)

svcClusterClient = svcClusterMgr.GetClient()
Expect(svcClusterClient).ToNot(BeNil())

createNamespace(svcClusterClient, "firewall")
createPostgresTestInstance()
createConfigMapSidecarConfig()
createCredentialSecrets()
}()
Eventually(done, 1000).Should(BeClosed())
})

var _ = AfterSuite(func() {
By("tearing down the test environment")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/go-logr/logr v0.3.0
github.com/metal-stack/firewall-controller v1.0.2-0.20210209073729-714a5bf22625
github.com/metal-stack/v v1.0.3
github.com/onsi/ginkgo v1.15.2
github.com/onsi/ginkgo v1.16.0
github.com/onsi/gomega v1.11.0
github.com/zalando/postgres-operator v1.6.1
inet.af/netaddr v0.0.0-20210203214853-aa702495c49b
Expand Down
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85n
github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg=
Expand Down Expand Up @@ -551,8 +552,8 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org=
github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o=
github.com/onsi/ginkgo v1.16.0 h1:NBrNLB37exjJLxXtFOktx6CISBdS1aF8+7MwKlTV8U4=
github.com/onsi/ginkgo v1.16.0/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
Expand Down