Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix star wars demo #5300

Merged
merged 2 commits into from
Aug 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 3 additions & 14 deletions test/k8sT/demos.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

var (
starWarsDemoLinkRoot = "https://raw.githubusercontent.com/cilium/star-wars-demo/b1d18870758af7cec713a4b5e4c3f013afe8c4bf/v1"
starWarsDemoLinkRoot = "https://raw.githubusercontent.com/cilium/star-wars-demo/v1.0"
)

func getStarWarsResourceLink(file string) string {
Expand All @@ -45,9 +45,8 @@ var _ = Describe("K8sDemosTest", func() {
backgroundCancel context.CancelFunc = func() { return }
backgroundError error

deathStarYAMLLink = getStarWarsResourceLink("02-deathstar.yaml")
l4PolicyYAMLLink = getStarWarsResourceLink("policy/l4_policy.yaml")
xwingYAMLLink = getStarWarsResourceLink("03-xwing.yaml")
deathStarYAMLLink = getStarWarsResourceLink("01-deathstar.yaml")
xwingYAMLLink = getStarWarsResourceLink("02-xwing.yaml")
l7PolicyYAMLLink = getStarWarsResourceLink("policy/l7_policy.yaml")
)

Expand Down Expand Up @@ -84,7 +83,6 @@ var _ = Describe("K8sDemosTest", func() {
AfterEach(func() {
By("Deleting all resources created during test")
kubectl.Delete(l7PolicyYAMLLink)
kubectl.Delete(l4PolicyYAMLLink)
kubectl.Delete(deathStarYAMLLink)
kubectl.Delete(xwingYAMLLink)

Expand Down Expand Up @@ -112,11 +110,6 @@ var _ = Describe("K8sDemosTest", func() {
err := kubectl.WaitforPods(helpers.DefaultNamespace, "", 300)
Expect(err).Should(BeNil(), "Pods are not ready after timeout")

By("Applying policy and waiting for policy revision to increase in Cilium pods")
_, err = kubectl.CiliumPolicyAction(
helpers.KubeSystemNamespace, l4PolicyYAMLLink, helpers.KubectlApply, 300)
Expect(err).Should(BeNil(), "Unable to apply %s", l4PolicyYAMLLink)

By("Getting xwing pod names")
xwingPods, err := kubectl.GetPodNames(helpers.DefaultNamespace, allianceLabel)
Expect(err).Should(BeNil())
Expand All @@ -139,10 +132,6 @@ var _ = Describe("K8sDemosTest", func() {
res.ExpectSuccess("unable to curl %s/v1: %s", deathstarFQDN, res.Output())

By("Importing L7 Policy which restricts access to %q", exhaustPortPath)
_, err = kubectl.CiliumPolicyAction(
helpers.KubeSystemNamespace, l4PolicyYAMLLink, helpers.KubectlDelete, 300)
Expect(err).Should(BeNil(), "Unable to delete %s", l4PolicyYAMLLink)

_, err = kubectl.CiliumPolicyAction(
helpers.KubeSystemNamespace, l7PolicyYAMLLink, helpers.KubectlApply, 300)
Expect(err).Should(BeNil(), "Unable to apply %s", l7PolicyYAMLLink)
Expand Down