Skip to content

Commit

Permalink
update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
salonichf5 committed May 7, 2024
1 parent 4c5f48a commit 694817b
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion internal/mode/static/nginx/config/servers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,32 @@ func TestExecuteServers(t *testing.T) {
KeyPairID: "test-keypair",
},
Port: 8443,
PathRules: []dataplane.PathRule{
{
Path: "/",
PathType: dataplane.PathTypePrefix,
MatchRules: []dataplane.MatchRule{
{
Match: dataplane.Match{},
BackendGroup: dataplane.BackendGroup{
Source: types.NamespacedName{Namespace: "test", Name: "route1"},
RuleIdx: 0,
Backends: []dataplane.Backend{
{
UpstreamName: "test_foo_443",
Valid: true,
Weight: 1,
VerifyTLS: &dataplane.VerifyTLS{
CertBundleID: "test-foo",
Hostname: "test-foo.example.com",
},
},
},
},
},
},
},
},
},
},
}
Expand All @@ -61,7 +87,7 @@ func TestExecuteServers(t *testing.T) {
"server_name cafe.example.com;": 2,
"ssl_certificate /etc/nginx/secrets/test-keypair.pem;": 2,
"ssl_certificate_key /etc/nginx/secrets/test-keypair.pem;": 2,
"proxy_ssl_server_name on;": 2,
"proxy_ssl_server_name on;": 1,
}
g := NewWithT(t)
serverResults := executeServers(conf)
Expand Down

0 comments on commit 694817b

Please sign in to comment.