class_docstr: Test class for the Terraform Cluster Generating
class_docstr_tok: ["Test","class","for","the","Terraform","Cluster","Generating"]
docstr: CLI - Terraform Generate S3 Bucket with Lifecycle
docstr_tok: ["CLI","-","Terraform","Generate","S3","Bucket","with","Lifecycle"]
code: def test_generate_s3_bucket_lifecycle(self):
      """CLI - Terraform Generate S3 Bucket with Lifecycle"""
      bucket = generate.generate_s3_bucket(
          bucket="unit.test.bucket",
          logging="my.s3-logging.bucket",
          force_destroy=False,
          lifecycle_rule={
              "prefix": "logs/",
              "enabled": True,
              "transition": {"days": 30, "storage_class": "GLACIER"},
          },
      )
  
      assert_equal(bucket["lifecycle_rule"]["prefix"], "logs/")
      assert_equal(bucket["force_destroy"], False)
      assert_equal(type(bucket["lifecycle_rule"]), dict)
      assert_equal(type(bucket["versioning"]), dict)
  
imports: from mock import ANY, Mock, patch
  from nose.tools import assert_equal, assert_dict_equal, assert_false, assert_raises, assert_true
  from streamalert.shared.exceptions import ConfigError
  from streamalert_cli.config import CLIConfig
  from streamalert_cli.terraform import common, cloudtrail, cloudwatch_destinations, cloudwatch_events, flow_logs, generate
label_desc: Use image node_id 3 for calling the TestTerraformGenerate obj's underlying member method code with example usage: obj.test_generate_s3_bucket_lifecycle() without return types