test: Add edge case for normalizeNodeHost URL parse error
Control character (null byte) triggers url.Parse error, covering the 'invalid host format' error branch. Coverage: 96.3% to 100%.
This commit is contained in:
parent
08765c7b59
commit
0fa717a78a
1 changed files with 6 additions and 0 deletions
|
|
@ -385,6 +385,12 @@ func TestNormalizeNodeHost(t *testing.T) {
|
|||
nodeType: "pve",
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "control character in host returns error",
|
||||
rawHost: "\x00invalid",
|
||||
nodeType: "pve",
|
||||
wantErr: true,
|
||||
},
|
||||
// Unknown node type (no default port added)
|
||||
{
|
||||
name: "unknown node type keeps host without port",
|
||||
|
|
|
|||
Loading…
Reference in a new issue