1 from charmhelpers
.core
.hookenv
import (
7 from charms
.reactive
import (
15 @when_not('native-ci.installed')
16 def install_native_ci_charm():
17 set_flag('native-ci.installed')
18 status_set('active', 'Ready!')
21 @when('actions.test', 'native-ci.installed')
25 except Exception as e
:
26 action_fail('command failed: {}'.format(e
))
28 action_set({'output': result
})
30 clear_flag('actions.test')
33 @when('actions.testint', 'native-ci.installed')
36 # Test the value is an int by performing a mathmatical operation on it.
37 intval
= action_get('intval')
39 except Exception as e
:
40 action_fail('command failed: {}'.format(e
))
42 action_set({'output': intval
})
44 clear_flag('actions.testint')
49 """Simulate providing database credentials."""
53 password
="mypassword",
61 """Simulate receiving database credentials."""