Skip to content

Commit

Permalink
test(k8s): Verify propagation of service account name to pod spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Duftler committed Oct 18, 2019
1 parent 281eb37 commit 423b2ec
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,4 +394,16 @@ class KubernetesV2ServiceTest extends Specification {
then:
yaml.contains('"tolerations": [{"key":"test","operator":"Equal","value":"a","effect":"NoSchedule"}]')
}

def "Can we set ServiceAccountNames"() {
setup:
def executor = Mock(KubernetesV2Executor)
serviceSettings.getKubernetes().serviceAccountName = "customServiceAccount"

when:
String podSpecYaml = testService.getPodSpecYaml(executor, details, config)

then:
podSpecYaml.contains('"serviceAccountName": customServiceAccount')
}
}

0 comments on commit 423b2ec

Please sign in to comment.