From 499e887fc735f300298dc60d5a3d09a366646b8c Mon Sep 17 00:00:00 2001 From: Gabriele Diener Date: Thu, 9 Jan 2020 16:00:34 +0100 Subject: [PATCH] [metricbeat] add test for priorityClassName --- metricbeat/tests/metricbeat_test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/metricbeat/tests/metricbeat_test.py b/metricbeat/tests/metricbeat_test.py index c3c693033..e78ecfc1a 100644 --- a/metricbeat/tests/metricbeat_test.py +++ b/metricbeat/tests/metricbeat_test.py @@ -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)