Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[metricbeat] add test for priorityClassName
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Diener committed Jan 9, 2020
1 parent 3bc1e4a commit 499e887
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions metricbeat/tests/metricbeat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,22 @@ def test_adding_an_affinity_rule():
assert r['daemonset'][name]['spec']['template']['spec']['affinity']['podAntiAffinity'][
'requiredDuringSchedulingIgnoredDuringExecution'][0]['topologyKey'] == 'kubernetes.io/hostname'


def test_priority_class_name():
config = '''
priorityClassName: ""
'''
r = helm_template(config)
spec = r['daemonset'][name]['spec']['template']['spec']
assert 'priorityClassName' not in spec

config = '''
priorityClassName: "highest"
'''
r = helm_template(config)
priority_class_name = r['daemonset'][name]['spec']['template']['spec']['priorityClassName']
assert priority_class_name == "highest"

def test_cluster_role_rules():
config = ''
r = helm_template(config)
Expand Down

0 comments on commit 499e887

Please sign in to comment.