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

Commit

Permalink
Fix octal literal to work in both Python 2 and Python 3
Browse files Browse the repository at this point in the history
$ __python3 -c "0600"__
```
  File "<string>", line 1
    0600
       ^
SyntaxError: invalid token
```
  • Loading branch information
cclauss committed Jun 26, 2019
1 parent 34bf8c9 commit 9399722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filebeat/tests/filebeat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down

0 comments on commit 9399722

Please sign in to comment.