Skip to content
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
1 change: 1 addition & 0 deletions internal/controller/postgresuser_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewPostgresUserReconciler(mgr manager.Manager, cfg *config.Cfg, pg postgres
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
pg: pg,
pgHost: cfg.PostgresHost,
instanceFilter: cfg.AnnotationFilter,
keepSecretName: cfg.KeepSecretName,
}
Expand Down
7 changes: 6 additions & 1 deletion internal/controller/postgresuser_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,14 @@ var _ = Describe("PostgresUser Controller", func() {
foundSecret := &corev1.Secret{}
err = cl.Get(ctx, types.NamespacedName{Name: secretName + "-" + name, Namespace: namespace}, foundSecret)
Expect(err).NotTo(HaveOccurred())
Expect(foundSecret.Data).To(HaveKey("ROLE"))
Expect(foundSecret.Data).To(HaveKey("DATABASE_NAME"))
Expect(foundSecret.Data).To(HaveKey("HOST"))
Expect(foundSecret.Data).To(HaveKey("LOGIN"))
Expect(foundSecret.Data).To(HaveKey("PASSWORD"))
Expect(foundSecret.Data).To(HaveKey("POSTGRES_DOTNET_URL"))
Expect(foundSecret.Data).To(HaveKey("POSTGRES_JDBC_URL"))
Expect(foundSecret.Data).To(HaveKey("POSTGRES_URL"))
Expect(foundSecret.Data).To(HaveKey("ROLE"))
})

It("should fail if the database does not exist", func() {
Expand Down