<commit_before># Copyright (c) 2009-2012 VMware, Inc.

require "spec_helper"

describe Bosh::AwsCloud::Cloud do
  before { @tmp_dir = Dir.mktmpdir }
  after { FileUtils.rm_rf(@tmp_dir) }

  describe "EBS-volume based flow" do
    let(:creator) { double(Bosh::AwsCloud::StemcellCreator) }

    context "fake stemcell" do
      let(:stemcell_properties) do
        {
          "root_device_name" => "/dev/sda1",
          "architecture" => "x86_64",
          "name" => "stemcell-name",
          "version" => "1.2.3",
          "ami" => {
            "us-east-1" => "ami-xxxxxxxx"
          }
        }
      end

      it "should return a fake stemcell" do
        cloud = mock_cloud do |ec2|
          allow(ec2).to receive_message_chain(:images, :filter).and_return([double('image', :id => "ami-xxxxxxxx")])
        end
        expect(cloud.create_stemcell("/tmp/foo", stemcell_properties)).to eq("ami-xxxxxxxx")
      end
    end
<commit_msg>Update unit test to reference "light" stemcells instead of "fake"<commit_after># Copyright (c) 2009-2012 VMware, Inc.

require "spec_helper"

describe Bosh::AwsCloud::Cloud do
  before { @tmp_dir = Dir.mktmpdir }
  after { FileUtils.rm_rf(@tmp_dir) }

  describe "EBS-volume based flow" do
    let(:creator) { double(Bosh::AwsCloud::StemcellCreator) }

    context "light stemcell" do
      let(:stemcell_properties) do
        {
          "root_device_name" => "/dev/sda1",
          "architecture" => "x86_64",
          "name" => "stemcell-name",
          "version" => "1.2.3",
          "ami" => {
            "us-east-1" => "ami-xxxxxxxx"
          }
        }
      end

      it "should return a light stemcell" do
        cloud = mock_cloud do |ec2|
          allow(ec2).to receive_message_chain(:images, :filter).and_return([double('image', :id => "ami-xxxxxxxx")])
        end
        expect(cloud.create_stemcell("/tmp/foo", stemcell_properties)).to eq("ami-xxxxxxxx light")
      end
    end

{'fraction_non_alphanumeric': 0.14564102564102563, 'fraction_numerical': 0.019487179487179488, 'mean_word_length': 2.5153153153153154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, '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': '7653891', 'n_tokens_mistral': 697, 'n_tokens_neox': 643, 'n_words': 136}