Skip to content

Commit

Permalink
テストの追加
Browse files Browse the repository at this point in the history
  • Loading branch information
pirosiki197 committed Oct 21, 2023
1 parent f597a24 commit 22625ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/domain/app_website_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestValidateDomain(t *testing.T) {
{"ok 4", "underscore_allowed.example.com", false},
{"invalid characters 1", "admin@example.com", true},
{"invalid characters 2", "space not allowed.example.com", true},
{"invalid characters 3", "UPPERCASE.example.com", true},
{"wildcard ng", "*.trap.show", true},
{"multi wildcard ng", "*.*.trap.show", true},
{"wildcard in middle", "trap.*.show", true},
Expand Down Expand Up @@ -157,6 +158,7 @@ func TestWebsite_Validate(t *testing.T) {
{"invalid fqdn3", Website{FQDN: "google.*.com", PathPrefix: "/", HTTPPort: 80}, true},
{"invalid fqdn4", Website{FQDN: "goo gle.com", PathPrefix: "/", HTTPPort: 80}, true},
{"invalid fqdn5", Website{FQDN: "no space", PathPrefix: "/", HTTPPort: 80}, true},
{"invalid fqdn6", Website{FQDN: "UPPERCASE.example.com", PathPrefix: "/", HTTPPort: 80}, true},
{"invalid path1", Website{FQDN: "google.com", PathPrefix: "", HTTPPort: 80}, true},
{"invalid path2", Website{FQDN: "google.com", PathPrefix: "../test", HTTPPort: 80}, true},
{"invalid path3", Website{FQDN: "google.com", PathPrefix: "/test/", HTTPPort: 80}, true},
Expand Down

0 comments on commit 22625ff

Please sign in to comment.