示例#1
0
def test_publish_helper():
    """CLI - Publish Athena Function"""
    config = MockCLIConfig(config=basic_streamalert_config())
    package = AthenaPackage(config=config)
    publish = LambdaVersion(config=config, package=package)
    result = publish._publish_helper()

    assert_equal(
        config['lambda']['athena_partition_refresh_config']['current_version'],
        11)
    assert_true(result)
示例#2
0
def test_publish_helper_clustered():
    """CLI - Publish Clustered Function"""
    config = MockCLIConfig(config=basic_streamalert_config())
    package = RuleProcessorPackage(config=config)
    publish = LambdaVersion(config=config, package=package)
    result = publish._publish_helper(cluster='prod')

    assert_true(result)
    assert_equal(
        config['clusters']['prod']['modules']['stream_alert']['rule_processor']
        ['current_version'], 11)