def test_publish_helper(): """CLI - Publish Athena Function""" config = MockCLIConfig(config=basic_streamalert_config()) package = AthenaPackage(version='1.0', config=config) publish = LambdaVersion(config=config, clustered_deploy=False, package=package) result = publish._publish_helper() assert_equal( config['lambda']['athena_partition_refresh_config']['current_version'], 11) assert_true(result)
def test_publish_helper_clustered(): """CLI - Publish Clustered Function""" config = MockCLIConfig(config=basic_streamalert_config()) package = RuleProcessorPackage(version='1.0', config=config) publish = LambdaVersion(config=config, clustered_deploy=True, package=package) result = publish._publish_helper(cluster='prod') assert_true(result) assert_equal( config['clusters']['prod']['modules']['stream_alert']['rule_processor'] ['current_version'], 11)