Skip to content

Commit

Permalink
provider-config: Test appending port when URL contains path
Browse files Browse the repository at this point in the history
Signed-off-by: Din Music <[email protected]>
  • Loading branch information
MusicDin committed Nov 29, 2024
1 parent faa0a48 commit 8233727
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions internal/provider-config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ func TestDetermineLXDAddress(t *testing.T) {
Address: "https://localhost:1234",
Expect: "https://localhost:1234",
},
{
Name: "Scheme, hostname, port | URL path",
Protocol: "simplestreams",
Address: "https://example.com/cloud-images/releases",
Expect: "https://example.com:443/cloud-images/releases",
},
{
Name: "Scheme, hostname, port | URL path with preconfigured port",
Protocol: "simplestreams",
Address: "https://example.com:1234/cloud-images/releases",
Expect: "https://example.com:1234/cloud-images/releases",
},
// Expected errors.
{
Name: "Unsupported simplestreams scheme",
Expand Down

0 comments on commit 8233727

Please sign in to comment.