@@ -48,6 +48,32 @@ func TestExecuteServers(t *testing.T) {
48
48
KeyPairID : "test-keypair" ,
49
49
},
50
50
Port : 8443 ,
51
+ PathRules : []dataplane.PathRule {
52
+ {
53
+ Path : "/" ,
54
+ PathType : dataplane .PathTypePrefix ,
55
+ MatchRules : []dataplane.MatchRule {
56
+ {
57
+ Match : dataplane.Match {},
58
+ BackendGroup : dataplane.BackendGroup {
59
+ Source : types.NamespacedName {Namespace : "test" , Name : "route1" },
60
+ RuleIdx : 0 ,
61
+ Backends : []dataplane.Backend {
62
+ {
63
+ UpstreamName : "test_foo_443" ,
64
+ Valid : true ,
65
+ Weight : 1 ,
66
+ VerifyTLS : & dataplane.VerifyTLS {
67
+ CertBundleID : "test-foo" ,
68
+ Hostname : "test-foo.example.com" ,
69
+ },
70
+ },
71
+ },
72
+ },
73
+ },
74
+ },
75
+ },
76
+ },
51
77
},
52
78
},
53
79
}
@@ -61,7 +87,7 @@ func TestExecuteServers(t *testing.T) {
61
87
"server_name cafe.example.com;" : 2 ,
62
88
"ssl_certificate /etc/nginx/secrets/test-keypair.pem;" : 2 ,
63
89
"ssl_certificate_key /etc/nginx/secrets/test-keypair.pem;" : 2 ,
64
- "proxy_ssl_server_name on;" : 2 ,
90
+ "proxy_ssl_server_name on;" : 1 ,
65
91
}
66
92
g := NewWithT (t )
67
93
serverResults := executeServers (conf )
0 commit comments