from __future__ import unicode_literals from yaml import safe_load from testtools import skipUnless from testtools.matchers import AfterPreprocessing, Equals from lae_util.testtools import TestCase from filepath import FilePath from lae_automation import __file__ as lae_package_location ROOT = FilePath(lae_package_location).parent().parent() STAGING = ROOT.sibling("k8s").child("secrets.staging.enc.yaml") PRODUCTION = ROOT.sibling("k8s").child("secrets.production.enc.yaml") class SecretsFileTests(TestCase): """ Tests for the files in the repository which contain the S4 secrets. """ @skipUnless( STAGING.exists() and PRODUCTION.exists(), "Staging and production secrets missing.", ) def test_same_staging_and_production_structure(self): """ The staging and production secrets files have the same overall structure (the same keys and hierarchy).