<commit_before>Shindo.tests('Fog::Compute[:ibm] | servers', ['ibm']) do

  tests('success') do

    @name           = "fog-test-instance-" + Time.now.to_i.to_s(32)
    @image_id       = "20010001"
    @instance_type  = "BRZ32.1/2048/60*175"
    @location_id    = "41"
    @key_name       = "fog-test-key-" + Time.now.to_i.to_s(32)
    @key            = Fog::Compute[:ibm].keys.create(:name => @key_name)

    @n_servers   = Fog::Compute[:ibm].servers.length
    @instance_id = Fog::Compute[:ibm].create_instance(@name, @image_id, @instance_type, @location_id, :key_name => @key_name).body["instances"][0]["id"]
    @server      = nil

    tests('Fog::Compute[:ibm].servers') do
      returns(@n_servers + 1) { Fog::Compute[:ibm].servers.length }
    end

    tests('Fog::Compute[:ibm].servers.get("#{@instance_id}")') do
      @server = Fog::Compute[:ibm].servers.get(@instance_id)
      returns(@instance_id) { @server.id }
    end

    @server.wait_for { ready? }
    @server.destroy
    @key.wait_for { instance_ids.empty? }
    @key.destroy

  end

end
<commit_msg>[ibm] Don't set server to nil<commit_after>Shindo.tests('Fog::Compute[:ibm] | servers', ['ibm']) do

  tests('success') do

    @name           = "fog-test-instance-" + Time.now.to_i.to_s(32)
    @image_id       = "20010001"
    @instance_type  = "BRZ32.1/2048/60*175"
    @location_id    = "41"
    @key_name       = "fog-test-key-" + Time.now.to_i.to_s(32)
    @key            = Fog::Compute[:ibm].keys.create(:name => @key_name)

    @n_servers   = Fog::Compute[:ibm].servers.length
    @instance_id = Fog::Compute[:ibm].create_instance(@name, @image_id, @instance_type, @location_id, :key_name => @key_name).body["instances"][0]["id"]

    tests('Fog::Compute[:ibm].servers') do
      returns(@n_servers + 1) { Fog::Compute[:ibm].servers.length }
    end

    tests('Fog::Compute[:ibm].servers.get("#{@instance_id}")') do
      @server = Fog::Compute[:ibm].servers.get(@instance_id)
      returns(@instance_id) { @server.id }
    end

    @server.wait_for { ready? }
    @server.destroy
    @key.wait_for { instance_ids.empty? }
    @key.destroy

  end

end

{'fraction_non_alphanumeric': 0.18817456593148757, 'fraction_numerical': 0.02627874237447208, 'mean_word_length': 3.247011952191235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5383866', 'n_tokens_mistral': 852, 'n_tokens_neox': 833, 'n_words': 109}