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

Commit 1e42daa

Browse files
kamilbednarzfpedrini
authored andcommitted
Add test for reading data bag encryption version from config file
1 parent 61a4629 commit 1e42daa

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
@@ -48,3 +48,7 @@ def test_bad_key_raises(self):
4848
for item in invalids:
4949
self.assertRaises(
5050
ValueError, ChefAPI, 'foobar', item, 'user')
51+
52+
def test_encryption(self):
53+
api = self.load('encryption.rb')
54+
self.assertEqual(api.encryption_version, '2')

0 commit comments

Comments
 (0)