Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

Commit 25b29dc

Browse files
committed
Add test for reading data bag encryption version from config file
1 parent 2674c36 commit 25b29dc

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

chef/tests/configs/encryption.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
chef_server_url 'http://chef:4000'
2+
client_key '../client.pem'
3+
node_name "test_1"
4+
5+
data_bag_encrypt_version 2

chef/tests/test_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ def test_env_variables(self):
2626
self.assertEqual(api.client, 'foobar')
2727
finally:
2828
del os.environ['_PYCHEF_TEST_']
29+
30+
def test_encryption(self):
31+
api = self.load('encryption.rb')
32+
self.assertEqual(api.encryption_version, '2')

0 commit comments

Comments
 (0)