-
Notifications
You must be signed in to change notification settings - Fork 432
/
lis_opt_types.go
48 lines (43 loc) · 1.22 KB
/
lis_opt_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package listener_options
import (
"net/http"
"path/filepath"
"github.com/onsi/gomega"
"github.com/solo-io/gloo/test/gomega/matchers"
"github.com/solo-io/skv2/codegen/util"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
var (
setupManifest = filepath.Join(util.MustGetThisDir(), "testdata", "setup.yaml")
basicLisOptManifest = filepath.Join(util.MustGetThisDir(), "testdata", "basic-lisopt.yaml")
// When we apply the setup file, we expect resources to be created with this metadata
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Namespace: "default",
}
proxyService = &corev1.Service{ObjectMeta: glooProxyObjectMeta}
proxyDeployment = &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Namespace: "default",
},
}
nginxPod = &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "nginx",
Namespace: "default",
},
}
exampleSvc = &corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: "example-svc",
Namespace: "default",
},
}
expectedHealthyResponse = &matchers.HttpResponse{
StatusCode: http.StatusOK,
Body: gomega.ContainSubstring("Welcome to nginx!"),
}
)