@@ -1123,21 +1123,21 @@ func TestCreateServers(t *testing.T) {
1123
1123
},
1124
1124
{
1125
1125
Path : "/_ngf-internal-rule0-route0" ,
1126
- ProxyPass : "http://test_foo_80 $request_uri" ,
1126
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1127
1127
ProxySetHeaders : httpBaseHeaders ,
1128
1128
Type : http .InternalLocationType ,
1129
1129
Includes : internalIncludes ,
1130
1130
},
1131
1131
{
1132
1132
Path : "/_ngf-internal-rule0-route1" ,
1133
- ProxyPass : "http://test_foo_80 $request_uri" ,
1133
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1134
1134
ProxySetHeaders : httpBaseHeaders ,
1135
1135
Type : http .InternalLocationType ,
1136
1136
Includes : internalIncludes ,
1137
1137
},
1138
1138
{
1139
1139
Path : "/_ngf-internal-rule0-route2" ,
1140
- ProxyPass : "http://test_foo_80 $request_uri" ,
1140
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1141
1141
ProxySetHeaders : httpBaseHeaders ,
1142
1142
Type : http .InternalLocationType ,
1143
1143
Includes : internalIncludes ,
@@ -1150,28 +1150,28 @@ func TestCreateServers(t *testing.T) {
1150
1150
},
1151
1151
{
1152
1152
Path : "/_ngf-internal-rule1-route0" ,
1153
- ProxyPass : "http://$test__route1_rule1 $request_uri" ,
1153
+ ProxyPass : "http://$upstream_test__route1_rule1 $request_uri" ,
1154
1154
ProxySetHeaders : httpBaseHeaders ,
1155
1155
Type : http .InternalLocationType ,
1156
1156
Includes : internalIncludes ,
1157
1157
},
1158
1158
{
1159
1159
Path : "/path-only/" ,
1160
- ProxyPass : "http://invalid -backend-ref$request_uri" ,
1160
+ ProxyPass : "http://upstream_invalid -backend-ref$request_uri" ,
1161
1161
ProxySetHeaders : httpBaseHeaders ,
1162
1162
Type : http .ExternalLocationType ,
1163
1163
Includes : externalIncludes ,
1164
1164
},
1165
1165
{
1166
1166
Path : "= /path-only" ,
1167
- ProxyPass : "http://invalid -backend-ref$request_uri" ,
1167
+ ProxyPass : "http://upstream_invalid -backend-ref$request_uri" ,
1168
1168
ProxySetHeaders : httpBaseHeaders ,
1169
1169
Type : http .ExternalLocationType ,
1170
1170
Includes : externalIncludes ,
1171
1171
},
1172
1172
{
1173
1173
Path : "/backend-tls-policy/" ,
1174
- ProxyPass : "https://test_btp_80 $request_uri" ,
1174
+ ProxyPass : "https://upstream_test_btp_80 $request_uri" ,
1175
1175
ProxySetHeaders : httpBaseHeaders ,
1176
1176
ProxySSLVerify : & http.ProxySSLVerify {
1177
1177
Name : "test-btp.example.com" ,
@@ -1182,7 +1182,7 @@ func TestCreateServers(t *testing.T) {
1182
1182
},
1183
1183
{
1184
1184
Path : "= /backend-tls-policy" ,
1185
- ProxyPass : "https://test_btp_80 $request_uri" ,
1185
+ ProxyPass : "https://upstream_test_btp_80 $request_uri" ,
1186
1186
ProxySetHeaders : httpBaseHeaders ,
1187
1187
ProxySSLVerify : & http.ProxySSLVerify {
1188
1188
Name : "test-btp.example.com" ,
@@ -1251,15 +1251,15 @@ func TestCreateServers(t *testing.T) {
1251
1251
{
1252
1252
Path : "/rewrite/" ,
1253
1253
Rewrites : []string {"^ /replacement break" },
1254
- ProxyPass : "http://test_foo_80 " ,
1254
+ ProxyPass : "http://upstream_test_foo_80 " ,
1255
1255
ProxySetHeaders : rewriteProxySetHeaders ,
1256
1256
Type : http .ExternalLocationType ,
1257
1257
Includes : externalIncludes ,
1258
1258
},
1259
1259
{
1260
1260
Path : "= /rewrite" ,
1261
1261
Rewrites : []string {"^ /replacement break" },
1262
- ProxyPass : "http://test_foo_80 " ,
1262
+ ProxyPass : "http://upstream_test_foo_80 " ,
1263
1263
ProxySetHeaders : rewriteProxySetHeaders ,
1264
1264
Type : http .ExternalLocationType ,
1265
1265
Includes : externalIncludes ,
@@ -1279,7 +1279,7 @@ func TestCreateServers(t *testing.T) {
1279
1279
{
1280
1280
Path : "/_ngf-internal-rule8-route0" ,
1281
1281
Rewrites : []string {"^ $request_uri" , "^/rewrite-with-headers(.*)$ /prefix-replacement$1 break" },
1282
- ProxyPass : "http://test_foo_80 " ,
1282
+ ProxyPass : "http://upstream_test_foo_80 " ,
1283
1283
ProxySetHeaders : rewriteProxySetHeaders ,
1284
1284
Type : http .InternalLocationType ,
1285
1285
Includes : internalIncludes ,
@@ -1322,7 +1322,7 @@ func TestCreateServers(t *testing.T) {
1322
1322
},
1323
1323
{
1324
1324
Path : "= /exact" ,
1325
- ProxyPass : "http://test_foo_80 $request_uri" ,
1325
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1326
1326
ProxySetHeaders : httpBaseHeaders ,
1327
1327
Type : http .ExternalLocationType ,
1328
1328
Includes : externalIncludes ,
@@ -1335,14 +1335,14 @@ func TestCreateServers(t *testing.T) {
1335
1335
},
1336
1336
{
1337
1337
Path : "/_ngf-internal-rule12-route0" ,
1338
- ProxyPass : "http://test_foo_80 $request_uri" ,
1338
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1339
1339
ProxySetHeaders : httpBaseHeaders ,
1340
1340
Type : http .InternalLocationType ,
1341
1341
Includes : internalIncludes ,
1342
1342
},
1343
1343
{
1344
1344
Path : "/proxy-set-headers/" ,
1345
- ProxyPass : "http://test_foo_80 $request_uri" ,
1345
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1346
1346
ProxySetHeaders : []http.Header {
1347
1347
{
1348
1348
Name : "my-header" ,
@@ -1396,7 +1396,7 @@ func TestCreateServers(t *testing.T) {
1396
1396
},
1397
1397
{
1398
1398
Path : "= /proxy-set-headers" ,
1399
- ProxyPass : "http://test_foo_80 $request_uri" ,
1399
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1400
1400
ProxySetHeaders : []http.Header {
1401
1401
{
1402
1402
Name : "my-header" ,
@@ -1450,15 +1450,15 @@ func TestCreateServers(t *testing.T) {
1450
1450
},
1451
1451
{
1452
1452
Path : "= /grpc/method" ,
1453
- ProxyPass : "grpc://test_foo_80 " ,
1453
+ ProxyPass : "grpc://upstream_test_foo_80 " ,
1454
1454
GRPC : true ,
1455
1455
ProxySetHeaders : grpcBaseHeaders ,
1456
1456
Type : http .ExternalLocationType ,
1457
1457
Includes : externalIncludes ,
1458
1458
},
1459
1459
{
1460
1460
Path : "= /grpc-with-backend-tls-policy/method" ,
1461
- ProxyPass : "grpcs://test_btp_80 " ,
1461
+ ProxyPass : "grpcs://upstream_test_btp_80 " ,
1462
1462
ProxySSLVerify : & http.ProxySSLVerify {
1463
1463
Name : "test-btp.example.com" ,
1464
1464
TrustedCertificate : "/etc/nginx/secrets/test-btp.crt" ,
@@ -1470,7 +1470,7 @@ func TestCreateServers(t *testing.T) {
1470
1470
},
1471
1471
{
1472
1472
Path : "= /include-path-only-match" ,
1473
- ProxyPass : "http://test_foo_80 $request_uri" ,
1473
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1474
1474
ProxySetHeaders : httpBaseHeaders ,
1475
1475
Type : http .ExternalLocationType ,
1476
1476
Includes : externalIncludes ,
@@ -1483,7 +1483,7 @@ func TestCreateServers(t *testing.T) {
1483
1483
},
1484
1484
{
1485
1485
Path : "/_ngf-internal-rule17-route0" ,
1486
- ProxyPass : "http://test_foo_80 $request_uri" ,
1486
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1487
1487
ProxySetHeaders : httpBaseHeaders ,
1488
1488
Rewrites : []string {"^ $request_uri break" },
1489
1489
Type : http .InternalLocationType ,
@@ -1625,13 +1625,13 @@ func TestCreateServersConflicts(t *testing.T) {
1625
1625
expLocs : []http.Location {
1626
1626
{
1627
1627
Path : "/coffee/" ,
1628
- ProxyPass : "http://test_foo_80 $request_uri" ,
1628
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1629
1629
ProxySetHeaders : httpBaseHeaders ,
1630
1630
Type : http .ExternalLocationType ,
1631
1631
},
1632
1632
{
1633
1633
Path : "= /coffee" ,
1634
- ProxyPass : "http://test_bar_80 $request_uri" ,
1634
+ ProxyPass : "http://upstream_test_bar_80 $request_uri" ,
1635
1635
ProxySetHeaders : httpBaseHeaders ,
1636
1636
Type : http .ExternalLocationType ,
1637
1637
},
@@ -1665,13 +1665,13 @@ func TestCreateServersConflicts(t *testing.T) {
1665
1665
expLocs : []http.Location {
1666
1666
{
1667
1667
Path : "= /coffee" ,
1668
- ProxyPass : "http://test_foo_80 $request_uri" ,
1668
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
1669
1669
ProxySetHeaders : httpBaseHeaders ,
1670
1670
Type : http .ExternalLocationType ,
1671
1671
},
1672
1672
{
1673
1673
Path : "/coffee/" ,
1674
- ProxyPass : "http://test_bar_80 $request_uri" ,
1674
+ ProxyPass : "http://upstream_test_bar_80 $request_uri" ,
1675
1675
ProxySetHeaders : httpBaseHeaders ,
1676
1676
Type : http .ExternalLocationType ,
1677
1677
},
@@ -1715,13 +1715,13 @@ func TestCreateServersConflicts(t *testing.T) {
1715
1715
expLocs : []http.Location {
1716
1716
{
1717
1717
Path : "/coffee/" ,
1718
- ProxyPass : "http://test_bar_80 $request_uri" ,
1718
+ ProxyPass : "http://upstream_test_bar_80 $request_uri" ,
1719
1719
ProxySetHeaders : httpBaseHeaders ,
1720
1720
Type : http .ExternalLocationType ,
1721
1721
},
1722
1722
{
1723
1723
Path : "= /coffee" ,
1724
- ProxyPass : "http://test_baz_80 $request_uri" ,
1724
+ ProxyPass : "http://upstream_test_baz_80 $request_uri" ,
1725
1725
ProxySetHeaders : httpBaseHeaders ,
1726
1726
Type : http .ExternalLocationType ,
1727
1727
},
@@ -2163,13 +2163,13 @@ func TestCreateLocationsRootPath(t *testing.T) {
2163
2163
expLocations : []http.Location {
2164
2164
{
2165
2165
Path : "/path-1" ,
2166
- ProxyPass : "http://test_foo_80 $request_uri" ,
2166
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
2167
2167
ProxySetHeaders : httpBaseHeaders ,
2168
2168
Type : http .ExternalLocationType ,
2169
2169
},
2170
2170
{
2171
2171
Path : "/path-2" ,
2172
- ProxyPass : "http://test_foo_80 $request_uri" ,
2172
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
2173
2173
ProxySetHeaders : httpBaseHeaders ,
2174
2174
Type : http .ExternalLocationType ,
2175
2175
},
@@ -2188,19 +2188,19 @@ func TestCreateLocationsRootPath(t *testing.T) {
2188
2188
expLocations : []http.Location {
2189
2189
{
2190
2190
Path : "/path-1" ,
2191
- ProxyPass : "http://test_foo_80 $request_uri" ,
2191
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
2192
2192
ProxySetHeaders : httpBaseHeaders ,
2193
2193
Type : http .ExternalLocationType ,
2194
2194
},
2195
2195
{
2196
2196
Path : "/path-2" ,
2197
- ProxyPass : "http://test_foo_80 $request_uri" ,
2197
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
2198
2198
ProxySetHeaders : httpBaseHeaders ,
2199
2199
Type : http .ExternalLocationType ,
2200
2200
},
2201
2201
{
2202
2202
Path : "/grpc" ,
2203
- ProxyPass : "grpc://test_foo_80 " ,
2203
+ ProxyPass : "grpc://upstream_test_foo_80 " ,
2204
2204
GRPC : true ,
2205
2205
ProxySetHeaders : grpcBaseHeaders ,
2206
2206
Type : http .ExternalLocationType ,
@@ -2219,19 +2219,19 @@ func TestCreateLocationsRootPath(t *testing.T) {
2219
2219
expLocations : []http.Location {
2220
2220
{
2221
2221
Path : "/path-1" ,
2222
- ProxyPass : "http://test_foo_80 $request_uri" ,
2222
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
2223
2223
ProxySetHeaders : httpBaseHeaders ,
2224
2224
Type : http .ExternalLocationType ,
2225
2225
},
2226
2226
{
2227
2227
Path : "/path-2" ,
2228
- ProxyPass : "http://test_foo_80 $request_uri" ,
2228
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
2229
2229
ProxySetHeaders : httpBaseHeaders ,
2230
2230
Type : http .ExternalLocationType ,
2231
2231
},
2232
2232
{
2233
2233
Path : "/" ,
2234
- ProxyPass : "http://test_foo_80 $request_uri" ,
2234
+ ProxyPass : "http://upstream_test_foo_80 $request_uri" ,
2235
2235
ProxySetHeaders : httpBaseHeaders ,
2236
2236
Type : http .ExternalLocationType ,
2237
2237
},
@@ -2798,7 +2798,7 @@ func TestCreateProxyPass(t *testing.T) {
2798
2798
GRPC bool
2799
2799
}{
2800
2800
{
2801
- expected : "http://10 .0.0.1:80$request_uri" ,
2801
+ expected : "http://upstream_10 .0.0.1:80$request_uri" ,
2802
2802
grp : dataplane.BackendGroup {
2803
2803
Backends : []dataplane.Backend {
2804
2804
{
@@ -2810,7 +2810,7 @@ func TestCreateProxyPass(t *testing.T) {
2810
2810
},
2811
2811
},
2812
2812
{
2813
- expected : "http://$ns1__bg_rule0 $request_uri" ,
2813
+ expected : "http://$upstream_ns1__bg_rule0 $request_uri" ,
2814
2814
grp : dataplane.BackendGroup {
2815
2815
Source : types.NamespacedName {Namespace : "ns1" , Name : "bg" },
2816
2816
Backends : []dataplane.Backend {
@@ -2828,7 +2828,7 @@ func TestCreateProxyPass(t *testing.T) {
2828
2828
},
2829
2829
},
2830
2830
{
2831
- expected : "http://10 .0.0.1:80" ,
2831
+ expected : "http://upstream_10 .0.0.1:80" ,
2832
2832
rewrite : & dataplane.HTTPURLRewriteFilter {
2833
2833
Path : & dataplane.HTTPPathModifier {},
2834
2834
},
@@ -2843,7 +2843,7 @@ func TestCreateProxyPass(t *testing.T) {
2843
2843
},
2844
2844
},
2845
2845
{
2846
- expected : "grpc://10 .0.0.1:80" ,
2846
+ expected : "grpc://upstream_10 .0.0.1:80" ,
2847
2847
grp : dataplane.BackendGroup {
2848
2848
Backends : []dataplane.Backend {
2849
2849
{
0 commit comments