"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "buildbot/test/integration/test_integration_secrets_with_vault.py" between
buildbot-3.0.2.tar.gz and buildbot-3.1.0.tar.gz

About: Buildbot is a continuous integration testing framework (Python-based). It supports also automation of complex build systems, application deployment, and management of sophisticated software-release processes.

test_integration_secrets_with_vault.py  (buildbot-3.0.2):test_integration_secrets_with_vault.py  (buildbot-3.1.0)
skipping to change at line 52 skipping to change at line 52
subprocess.check_call(['docker', 'exec', subprocess.check_call(['docker', 'exec',
'-e', 'VAULT_ADDR=http://127.0.0.1:8200/', '-e', 'VAULT_ADDR=http://127.0.0.1:8200/',
'vault_for_buildbot', 'vault_for_buildbot',
'vault', 'kv', 'put', 'secret/key', 'value=wo rd']) 'vault', 'kv', 'put', 'secret/key', 'value=wo rd'])
subprocess.check_call(['docker', 'exec', subprocess.check_call(['docker', 'exec',
'-e', 'VAULT_ADDR=http://127.0.0.1:8200/', '-e', 'VAULT_ADDR=http://127.0.0.1:8200/',
'vault_for_buildbot', 'vault_for_buildbot',
'vault', 'kv', 'put', 'secret/anykey', 'anyva lue=anyword']) 'vault', 'kv', 'put', 'secret/anykey', 'anyva lue=anyword'])
subprocess.check_call(['docker', 'exec',
'-e', 'VAULT_ADDR=http://127.0.0.1:8200/',
'vault_for_buildbot',
'vault', 'kv', 'put', 'secret/key1/key2', 'id
=val'])
except (FileNotFoundError, subprocess.CalledProcessError): except (FileNotFoundError, subprocess.CalledProcessError):
raise SkipTest("Vault integration needs docker environment to be set up") raise SkipTest("Vault integration needs docker environment to be set up")
def remove_container(self): def remove_container(self):
subprocess.call(['docker', 'rm', '-f', 'vault_for_buildbot']) subprocess.call(['docker', 'rm', '-f', 'vault_for_buildbot'])
@defer.inlineCallbacks @defer.inlineCallbacks
def do_secret_test(self, secret_specifier, expected_obfuscation, expected_va lue): def do_secret_test(self, secret_specifier, expected_obfuscation, expected_va lue):
yield self.setupConfig(masterConfig(secret_specifier=secret_specifier)) yield self.setupConfig(masterConfig(secret_specifier=secret_specifier))
build = yield self.doForceBuild(wantSteps=True, wantLogs=True) build = yield self.doForceBuild(wantSteps=True, wantLogs=True)
skipping to change at line 84 skipping to change at line 89
yield self.do_secret_test('%(secret:key)s', '<key>', 'word') yield self.do_secret_test('%(secret:key)s', '<key>', 'word')
@defer.inlineCallbacks @defer.inlineCallbacks
def test_key_value(self): def test_key_value(self):
yield self.do_secret_test('%(secret:key/value)s', '<key/value>', 'word') yield self.do_secret_test('%(secret:key/value)s', '<key/value>', 'word')
@defer.inlineCallbacks @defer.inlineCallbacks
def test_any_key(self): def test_any_key(self):
yield self.do_secret_test('%(secret:anykey/anyvalue)s', '<anykey/anyvalu e>', 'anyword') yield self.do_secret_test('%(secret:anykey/anyvalue)s', '<anykey/anyvalu e>', 'anyword')
@defer.inlineCallbacks
def test_nested_key(self):
yield self.do_secret_test('%(secret:key1/key2/id)s', '<key1/key2/id>', '
val')
def masterConfig(secret_specifier): def masterConfig(secret_specifier):
c = {} c = {}
from buildbot.config import BuilderConfig from buildbot.config import BuilderConfig
from buildbot.process.factory import BuildFactory from buildbot.process.factory import BuildFactory
from buildbot.plugins import schedulers from buildbot.plugins import schedulers
c['schedulers'] = [ c['schedulers'] = [
schedulers.ForceScheduler( schedulers.ForceScheduler(
name="force", name="force",
builderNames=["testy"])] builderNames=["testy"])]
 End of changes. 2 change blocks. 
0 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)