Пример #1
0
def test_SSM_put_overwrite_true():
    ssm = aws.SSM()
    ssm.put(name='/test/param', value='hello world')
    ssm = aws.SSM(path='/test')
    assert ssm.get('param') == 'hello world'
    ssm.put(name='param', value='hello new world', overwrite=True)
    assert ssm.get('param') == 'hello new world'
Пример #2
0
def test_ssm_get_paramenter(ssm_client):
    ssm_client.put_parameter(Name='/test/param',
                             Value='hello world',
                             Type='String',
                             Tier='Standard')

    ssm = aws.SSM(path='/test')
    assert ssm.get('param') == 'hello world'
Пример #3
0
def test_ssm_get_list_2_paramenter_strip_whitespaces(ssm_client):
    ssm_client.put_parameter(Name='/test/param',
                             Value=' hello , world ',
                             Type='StringList',
                             Tier='Standard')

    ssm = aws.SSM(path='/test')
    assert ssm.get('param') == ['hello', 'world']
Пример #4
0
def test_SSM_put():
    ssm = aws.SSM()
    ssm.put(name='/test/param', value='hello world')
    ssm = aws.SSM(path='/test')
    assert ssm.get('param') == 'hello world'
Пример #5
0
def test_ssm_default():
    ssm = aws.SSM()
    assert ssm.path.startswith('/') and \
           environ.get('STAGE') in ssm.path and \
           ssm.path.endswith(environ.get('SERVICE'))