Skip to content

Commit

Permalink
test: add complex test case
Browse files Browse the repository at this point in the history
  • Loading branch information
a60814billy committed Nov 28, 2019
1 parent e11141d commit cda3bb5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions portchecker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func TestParseStringToNetPort(t *testing.T) {
{"mysql://testuser:[email protected]/db", []string{"mysql://testuser:[email protected]/db", "tcp", "mysql-host.local", "3306"}},
{"mysql://testuser:[email protected]:1234/db", []string{"mysql://testuser:[email protected]:1234/db", "tcp", "mysql-host.local", "1234"}},
{"mysql://hackmd:password@host:3306/hackmd?charset=utf8mb4", []string{"mysql://hackmd:password@host:3306/hackmd?charset=utf8mb4", "tcp", "host", "3306"}},
{"mysql://u-s_er:p!%ass@hack-md_db.local:1234/h_a-ckmd", []string{"mysql://u-s_er:p!%ass@hack-md_db.local:1234/h_a-ckmd", "tcp", "hack-md_db.local", "1234"}},
{"redis://localhost:1234", []string{"redis://localhost:1234", "tcp", "localhost", "1234"}},
{"redis://localhost", []string{"redis://localhost", "tcp", "localhost", "6379"}},
{"redis://test-cache", []string{"redis://test-cache", "tcp", "test-cache", "6379"}},
Expand Down

0 comments on commit cda3bb5

Please sign in to comment.