Exemplo n.º 1
0
    def test_normal_outputs(self, session):
        os.environ['SERVERLESS_STAGE'] = 'dev'
        os.environ['SERVERLESS_PROJECT_NAME'] = 'mws'
        out = serverless_helpers.load_cfn_outputs(session)
        assert len(out) == 2
        assert 'Description' in out['IamRoleArnLambda']
        assert 'Value' in out['IamRoleArnLambda']
        assert out['IamRoleArnLambda']['Value'].startswith('arn:aws:iam::123456789012')
        assert out['DynamoTable']['Description'] == 'Name of DDB table'

        assert os.getenv('SERVERLESS_CF_IamRoleArnLambda').startswith('arn:aws:iam::123456789012')
Exemplo n.º 2
0
 def test_no_outputs(self, session):
     os.environ['SERVERLESS_STAGE'] = 'dev'
     os.environ['SERVERLESS_PROJECT_NAME'] = 'no_outputs'
     out = serverless_helpers.load_cfn_outputs(session)
     assert out == {}