Skip to content

Commit

Permalink
chore: fix connection tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Nov 17, 2023
1 parent fb9b5f9 commit c65f01b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion context/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func extractConnectionNameType(connectionString string) (name, namespace, connec

connectionString = strings.TrimPrefix(connectionString, prefix)
parts := strings.Split(connectionString, "/")
if len(parts) > 3 || len(parts) < 1 {
if len(parts) > 3 || len(parts) < 2 {
return
}

Expand Down
8 changes: 4 additions & 4 deletions context/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ func TestGetConnectionNameType(t *testing.T) {
connectionType string
found bool
}{
name: "mission_control//",
namespace: "default",
connectionType: "db",
found: true,
name: "",
namespace: "",
connectionType: "",
found: false,
},
},
{
Expand Down

0 comments on commit c65f01b

Please sign in to comment.