Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Nov 6, 2023
1 parent 741cc27 commit 0276f31
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion models/connections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func Test_Connection_AsGoGetterURL(t *testing.T) {
Certificate: "cert123",
Properties: map[string]string{"ref": "main"},
},
expectedURL: "https://github.com/repo.git?ref=main&sshkey=Y2VydDEyMw%3D%3D",
expectedURL: "git::https://github.com/repo.git?ref=main&sshkey=Y2VydDEyMw%3D%3D",
expectedError: nil,
},
}
Expand Down
13 changes: 7 additions & 6 deletions tests/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import (
var _ = Describe("Connection", Ordered, func() {
BeforeAll(func() {
tx := testutils.DefaultContext.DB().Save(&models.Connection{
Name: "test",
Type: "test",
Username: "configmap://test-cm/foo",
Password: "secret://test-secret/foo",
URL: "sql://db?user=$(username)&password=$(password)",
Name: "test",
Type: "test",
Namespace: "default",
Username: "configmap://test-cm/foo",
Password: "secret://test-secret/foo",
URL: "sql://db?user=$(username)&password=$(password)",
})
Expect(tx.Error).ToNot(HaveOccurred())
})
Expand All @@ -32,7 +33,7 @@ var _ = Describe("Connection", Ordered, func() {
var connection *models.Connection
var err error
It("should be retrieved successfully", func() {
connection, err = testutils.DefaultContext.GetConnection("test", "test", "default")
connection, err = testutils.DefaultContext.GetConnection("test", "test")
Expect(err).ToNot(HaveOccurred())
})

Expand Down

0 comments on commit 0276f31

Please sign in to comment.