Skip to content

Commit

Permalink
Update TestPipelineRunWithServiceAccountNameAndTaskRunSpec to use dif…
Browse files Browse the repository at this point in the history
…ferent podtemplate field
  • Loading branch information
savitaashture committed Oct 27, 2020
1 parent 51a02c8 commit ba69c5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/serviceaccount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ func TestPipelineRunWithServiceAccountNameAndTaskRunSpec(t *testing.T) {
t.Fatalf("Failed to create Pipeline `%s`: %s", pipeline.Name, err)
}

dnsPolicy := corev1.DNSClusterFirst
// Create a PipelineRun that uses those ServiceAccount
pipelineRun := &v1beta1.PipelineRun{
ObjectMeta: metav1.ObjectMeta{Name: "pipelinerunwithasas", Namespace: namespace},
Expand All @@ -271,14 +272,13 @@ func TestPipelineRunWithServiceAccountNameAndTaskRunSpec(t *testing.T) {
TaskRunSpecs: []v1beta1.PipelineTaskRunSpec{{
PipelineTaskName: "task1",
TaskPodTemplate: &v1beta1.PodTemplate{
HostNetwork: true,
DNSPolicy: &dnsPolicy,
},
}},
},
}

_, err := c.PipelineRunClient.Create(ctx, pipelineRun, metav1.CreateOptions{})
if err != nil {
if _, err := c.PipelineRunClient.Create(ctx, pipelineRun, metav1.CreateOptions{}); err != nil {
t.Fatalf("Failed to create PipelineRun `%s`: %s", pipelineRun.Name, err)
}

Expand Down

0 comments on commit ba69c5d

Please sign in to comment.