Skip to content

Commit

Permalink
Fix malformed connection remote name when using ssh remote uri (dmacv…
Browse files Browse the repository at this point in the history
  • Loading branch information
tiaden authored and dmacvicar committed Sep 28, 2024
1 parent b744774 commit a624ad9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libvirt/uri/connection_uri.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func (u *ConnectionURI) RemoteName() string {

newURI := *u
newURI.Scheme = u.driver()
newURI.User = nil
newURI.Host = ""
newURI.RawQuery = ""

Expand Down
1 change: 1 addition & 0 deletions libvirt/uri/connection_uri_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func TestURI(t *testing.T) {
{"xxx+tcp:///", "xxx", "tcp", "xxx:///"},
{"xxx+unix:///", "xxx", "unix", "xxx:///"},
{"xxx+tls://servername/?foo=bar&name=dong:///ding", "xxx", "tls", "dong:///ding"},
{"xxx+ssh://username@hostname:2222/path?foo=bar&bar=foo", "xxx", "ssh", "xxx:///path"},
}

for _, fixture := range fixtures {
Expand Down

0 comments on commit a624ad9

Please sign in to comment.