Skip to content

Commit

Permalink
Update dash tests to use ingressgateway (istio#6194)
Browse files Browse the repository at this point in the history
* Update dash tests to use ingressgateway

* Fix network config, alter error codes
  • Loading branch information
douglas-reid authored and rshriram committed Jun 13, 2018
1 parent 22594e7 commit 12b8df1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/tests/dashboard/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func sendTrafficToCluster(gateway string) (*fhttp.HTTPRunnerResults, error) {
Out: os.Stderr,
},
HTTPOptions: fhttp.HTTPOptions{
URL: gateway + "/fortio/?status=404:10,503:15&size=1024:10,512:5",
URL: gateway + "/?status=418:10,520:15&size=1024:10,512:5",
},
AllowInitialErrors: true,
}
Expand Down Expand Up @@ -327,7 +327,7 @@ func (t *testConfig) Setup() (err error) {
return fmt.Errorf("mixer's proxy never was ready to serve traffic: %v", err)
}

gateway, errGw := tc.Kube.Ingress()
gateway, errGw := tc.Kube.IngressGateway()
if errGw != nil {
return errGw
}
Expand Down
55 changes: 27 additions & 28 deletions tests/e2e/tests/dashboard/fortio-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,38 @@ spec:
selector:
app: echosrv
---
apiVersion: extensions/v1beta1
kind: Ingress
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
annotations:
kubernetes.io/ingress.class: istio
name: istio-ingress
name: fortiogateway
spec:
rules:
- http:
paths:
- path: /fortio/.*
backend:
serviceName: echosrv
servicePort: http-echo
- path: /tcp/.*
backend:
serviceName: tcpechosrv
servicePort: tcp-echo
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"

---
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: fortio-redir
name: fortio
spec:
destination:
name: echosrv
match:
request:
headers:
uri:
prefix: /fortio/ # prefix
rewrite:
uri: / # drop the /fortio prefix when talking to fortio such as /fortio/foo -> /foo
hosts:
- "*"
gateways:
- fortiogateway
http:
- route:
- destination:
port:
number: 8080
host: echosrv

---
apiVersion: apps/v1beta1
kind: Deployment
Expand Down

0 comments on commit 12b8df1

Please sign in to comment.