fix(custom): parse port option line for OpenVPN

This commit is contained in:
Quentin McGaw
2024-04-30 08:02:28 +00:00
parent 72e2e4b82c
commit 45fe38e670
2 changed files with 37 additions and 0 deletions

View File

@@ -118,6 +118,14 @@ func Test_extractDataFromLine(t *testing.T) {
port: 1194,
protocol: constants.UDP,
},
"extract_port_fail": {
line: "port a",
isErr: errPortNotValid,
},
"extract_port_success": {
line: "port 1194",
port: 1194,
},
}
for name, testCase := range testCases {