Skip to content

Commit

Permalink
Add HTTP test
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper committed Feb 4, 2019
1 parent f835529 commit aad104d
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 1 deletion.
18 changes: 17 additions & 1 deletion integration/creategetdelete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,23 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() {
Expect(err).ShouldNot(HaveOccurred())
defer test.Close()

d := test.CreateDaemonSetFromFile(test.Namespace, "dns-test.yaml")
d := test.CreateDaemonSetFromFile(test.Namespace, "test-dns.yaml")

test.WaitForDaemonSetReady(d, 3*time.Minute)

{
ds, err := test.GetDaemonSet(test.Namespace, d.Name)
Expect(err).ShouldNot(HaveOccurred())
fmt.Fprintf(GinkgoWriter, "ds.Status = %#v", ds.Status)
}
})

It("should have access to HTTP(S) sites", func() {
test, err := newKubeTest()
Expect(err).ShouldNot(HaveOccurred())
defer test.Close()

d := test.CreateDaemonSetFromFile(test.Namespace, "test-http.yaml")

test.WaitForDaemonSetReady(d, 3*time.Minute)

Expand Down
76 changes: 76 additions & 0 deletions integration/test-http.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: test-http
labels: {test: http}
spec:
selector:
matchLabels: {test: http}
template:
metadata:
labels: {test: http}
spec:
containers:
- image: tutum/curl@sha256:b6f16e88387acd4e6326176b212b3dae63f5b2134e69560d0b0673cfb0fb976f
name: https-test-eksctl
stdin: true
tty: true
readinessProbe:
initialDelaySeconds: 0
periodSeconds: 3
failureThreshold: 3
timeoutSeconds: 1
exec:
command:
- curl
- --fail
- --silent
- --head
- eksctl.io
- image: tutum/curl@sha256:b6f16e88387acd4e6326176b212b3dae63f5b2134e69560d0b0673cfb0fb976f
name: https-test-kubernetes
stdin: true
tty: true
readinessProbe:
initialDelaySeconds: 0
periodSeconds: 3
failureThreshold: 3
timeoutSeconds: 1
exec:
command:
- curl
- --fail
- --silent
- --head
- kubernetes.io
- image: tutum/curl@sha256:b6f16e88387acd4e6326176b212b3dae63f5b2134e69560d0b0673cfb0fb976f
name: https-test-ifconfig
stdin: true
tty: true
readinessProbe:
initialDelaySeconds: 0
periodSeconds: 3
failureThreshold: 3
timeoutSeconds: 1
exec:
command:
- curl
- --fail
- --silent
- https://ifconfig.co/
- image: tutum/curl@sha256:b6f16e88387acd4e6326176b212b3dae63f5b2134e69560d0b0673cfb0fb976f
name: https-test-metadata
stdin: true
tty: true
readinessProbe:
initialDelaySeconds: 0
periodSeconds: 3
failureThreshold: 3
timeoutSeconds: 1
exec:
command:
- curl
- --fail
- --silent
- http://169.254.169.254/latest/meta-data/local-ipv4

0 comments on commit aad104d

Please sign in to comment.