<commit_before>require 'spec_helper'

describe Chef::Resource::AwsAutoScalingGroup do
  extend AWSSupport

  when_the_chef_12_server 'exists', organization: 'foo', server_scope: :context do
    with_aws 'When connected to AWS' do
      aws_launch_configuration 'test_config' do
        image 'ami-993383ea'<commit_msg>Autoselect ami based upon test region<commit_after>require 'spec_helper'

describe Chef::Resource::AwsAutoScalingGroup do
  extend AWSSupport

  when_the_chef_12_server 'exists', organization: 'foo', server_scope: :context do
    with_aws 'When connected to AWS' do
      # Select an amazon linux ami based upon region
      ami = {
        'eu-west-1' => 'ami-3850624c',
        'eu-central-1' => 'ami-993383ea',
        'us-east-1' => 'ami-e024bf89',
        'us-west-1' => 'ami-951945d0',
        'us-west-2' => 'ami-16fd7026',
        'ap-northeast-1' => 'ami-dcfa4edd',
        'ap-northeast-2' => 'ami-7308c51d',
        'ap-southeast-1' => 'ami-74dda626',
        'ap-southeast-2' => 'ami-b5990e8f',
        'sa-east-1' => 'ami-3e3be423'
      }[driver.aws_config.region]

      aws_launch_configuration 'test_config' do
        image ami
{'fraction_non_alphanumeric': 0.13241616509028376, 'fraction_numerical': 0.06276870163370593, 'mean_word_length': 3.2021660649819497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1452913', 'n_tokens_mistral': 466, 'n_tokens_neox': 418, 'n_words': 84}