Skip to content
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

chore: avoid pushing the broker in acceptance tests unnecessarily #880

Merged
merged 1 commit into from
Sep 14, 2023
Merged
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
16 changes: 2 additions & 14 deletions acceptance-tests/postgresql_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package acceptance_test

import (
"csbbrokerpakgcp/acceptance-tests/helpers/brokers"
"csbbrokerpakgcp/acceptance-tests/helpers/matchers"
"csbbrokerpakgcp/acceptance-tests/helpers/random"
"net"
Expand All @@ -16,20 +15,9 @@ import (

var _ = Describe("PostgreSQL", func() {
Describe("Can be accessed by an app", func() {
var broker *brokers.Broker

BeforeEach(func() {
broker = brokers.Create(
brokers.WithPrefix("csb-postgresql"),
brokers.WithLatestEnv(),
brokers.WithEnv(apps.EnvVar{Name: "GSB_COMPATIBILITY_ENABLE_BETA_SERVICES", Value: "false"}),
)
defer broker.Delete()
})

It("works with the default postgres version", Label("postgresql"), func() {
By("creating a service instance")
serviceInstance := services.CreateInstance("csb-google-postgres", "small", services.WithBroker(broker))
serviceInstance := services.CreateInstance("csb-google-postgres", "small")
defer serviceInstance.Delete()

postgresTestMultipleApps(serviceInstance)
Expand All @@ -38,7 +26,7 @@ var _ = Describe("PostgreSQL", func() {

It("works with latest changes to public schema in postgres 15", Label("Postgres15"), func() {
By("creating a service instance")
serviceInstance := services.CreateInstance("csb-google-postgres", "pg15", services.WithBroker(broker))
serviceInstance := services.CreateInstance("csb-google-postgres", "pg15")
defer serviceInstance.Delete()

postgresTestMultipleApps(serviceInstance)
Expand Down
Loading