Add setup and test code for barbican-vault

This commit is contained in:
Frode Nordahl
2018-11-09 11:55:46 +01:00
parent 2f680ccd93
commit b88447c7c6
2 changed files with 48 additions and 0 deletions
@@ -0,0 +1,15 @@
# Copyright 2018 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Collection of code for setting up and testing barbican-vault."""
+33
View File
@@ -0,0 +1,33 @@
# Copyright 2018 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Encapsulate barbican-vault testing."""
import zaza
import zaza.charm_tests.vault.tests as vault_tests
class BarbicanVaultUnsealVault(vault_tests.UnsealVault):
"""Helper class to unseal Vault and update deploy status expectations."""
@classmethod
def setUpClass(cls):
"""Run setup for UnsealVault class."""
super(BarbicanVaultUnsealVault, cls).setUpClass()
def test_unseal(self):
"""Unseal vault, update barbican-vault deploy status expectations."""
test_config = zaza.charm_lifecycle.utils.get_charm_config()
del test_config['target_deploy_status']['barbican-vault']
super().test_unseal(test_config)