Skip to content

Commit

Permalink
Adding a test for len = 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Dumont committed Aug 6, 2020
1 parent fccb113 commit 12cf9ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/terraform_apply_destroy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,12 @@ func TestApplyAndDestroyWithSingleContainer(t *testing.T) {
_, err = terraform.InitAndApplyE(t, options)
assert.NoError(t, err)

pod := k8s.ListPods(t, k8sOptions, metav1.ListOptions{LabelSelector: "app=test-name"})[0]
pods := k8s.ListPods(t, k8sOptions, metav1.ListOptions{LabelSelector: "app=test-name"})

pod := pods[0]
container := pod.Spec.Containers[0]

assert.Equal(t,len(pods),1)
assert.Equal(t, "training/webapp:latest", container.Image)
assert.Contains(t, pod.ObjectMeta.Annotations, "linkerd.io/inject")
assert.Contains(t, pod.ObjectMeta.Annotations, "foo")
Expand Down

0 comments on commit 12cf9ec

Please sign in to comment.