Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit b07c5d8

Browse files
authored
Add tests for tcpproxy functionality (#45)
Signed-off-by: Nick Young <ynick@vmware.com>
1 parent e2ba316 commit b07c5d8

9 files changed

Lines changed: 96 additions & 0 deletions

File tree

internal/translator/testdata/tcpproxy_delegate/errors.txt

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: contour.heptio.com/v1beta1
3+
kind: IngressRoute
4+
metadata:
5+
name: tcpproxy-test
6+
spec:
7+
virtualhost:
8+
fqdn: "tcpproxy-test.domain.com"
9+
tls:
10+
secretName: "secret"
11+
tcpproxy:
12+
delegate:
13+
name: delegate
14+
namespace: default
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: projectcontour.io/v1
3+
kind: HTTPProxy
4+
metadata:
5+
name: tcpproxy-test
6+
spec:
7+
includes:
8+
- name: delegate
9+
namespace: default
10+
virtualhost:
11+
fqdn: tcpproxy-test.domain.com
12+
tls:
13+
secretName: secret
14+
status: {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Healthcheck policy of TCPProxy service has no effect, discarding
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: contour.heptio.com/v1beta1
3+
kind: IngressRoute
4+
metadata:
5+
name: tcpproxy-test
6+
spec:
7+
virtualhost:
8+
fqdn: "tcpproxy-test.domain.com"
9+
tls:
10+
secretName: "secret"
11+
tcpproxy:
12+
services:
13+
- name: s1
14+
port: 80
15+
healthCheck:
16+
path: /healthy
17+
intervalSeconds: 5
18+
timeoutSeconds: 2
19+
unhealthyThresholdCount: 3
20+
healthyThresholdCount: 5
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: projectcontour.io/v1
3+
kind: HTTPProxy
4+
metadata:
5+
name: tcpproxy-test
6+
spec:
7+
tcpproxy:
8+
services:
9+
- name: s1
10+
port: 80
11+
virtualhost:
12+
fqdn: tcpproxy-test.domain.com
13+
tls:
14+
secretName: secret
15+
status: {}

internal/translator/testdata/tcpproxy_lbpolicy/errors.txt

Whitespace-only changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: contour.heptio.com/v1beta1
3+
kind: IngressRoute
4+
metadata:
5+
name: tcpproxy-test
6+
spec:
7+
virtualhost:
8+
fqdn: "tcpproxy-test.domain.com"
9+
tls:
10+
secretName: "secret"
11+
tcpproxy:
12+
services:
13+
- name: s1
14+
port: 80
15+
strategy: WeightedLeastRequest
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
apiVersion: projectcontour.io/v1
3+
kind: HTTPProxy
4+
metadata:
5+
name: tcpproxy-test
6+
spec:
7+
tcpproxy:
8+
loadBalancerPolicy:
9+
strategy: WeightedLeastRequest
10+
services:
11+
- name: s1
12+
port: 80
13+
virtualhost:
14+
fqdn: tcpproxy-test.domain.com
15+
tls:
16+
secretName: secret
17+
status: {}

0 commit comments

Comments
 (0)