From 93997220a742faf1cbd31c50f7858a922aa20122 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 26 Jun 2019 16:59:04 +0200 Subject: [PATCH] Fix octal literal to work in both Python 2 and Python 3 $ __python3 -c "0600"__ ``` File "", line 1 0600 ^ SyntaxError: invalid token ``` --- filebeat/tests/filebeat_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filebeat/tests/filebeat_test.py b/filebeat/tests/filebeat_test.py index da73f54e7..616144d86 100644 --- a/filebeat/tests/filebeat_test.py +++ b/filebeat/tests/filebeat_test.py @@ -137,7 +137,7 @@ def test_adding_in_filebeat_config(): d = r['daemonset'][name]['spec']['template']['spec'] - assert {'configMap': {'name': name + '-config', 'defaultMode': 0600}, 'name': project + '-config'} in d['volumes'] + assert {'configMap': {'name': name + '-config', 'defaultMode': 0o600}, 'name': project + '-config'} in d['volumes'] assert {'mountPath': '/usr/share/filebeat/filebeat.yml', 'name': project + '-config', 'subPath': 'filebeat.yml', 'readOnly': True} in d['containers'][0]['volumeMounts'] assert {'mountPath': '/usr/share/filebeat/other-config.yml', 'name': project + '-config', 'subPath': 'other-config.yml', 'readOnly': True} in d['containers'][0]['volumeMounts']