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

  @key_format  = {
    'default'           => Fog::Boolean,
    'instanceIds'       => Array,
    'keyMaterial'       => String,
    'keyName'           => String,
    'lastModifiedTime'  => Integer
  }

  @keys_format = {
    'keys'     => [ @key_format ]
  }

  tests('success') do

    @key_name  = 'fog-test-key' + Time.now.to_i.to_s(32)
    @public_key = <<-EOF
    -----BEGIN RSA PUBLIC KEY-----
    <KEY>
    -----END RSA PUBLIC KEY-----
    EOF
    @public_key.gsub!(/^\s{4}/, '')

    tests("#create_key('#{@key_name}')").formats(@key_format) do
      Fog::Compute[:ibm].create_key(@key_name).body
    end

    tests("#create_key('#{@key_name}', '#{@public_key}')").formats(@key_format) do
      Fog::Compute[:ibm].create_key(@key_name, @public_key).body
    end

    tests("#list_keys").formats(@keys_format) do
      Fog::Compute[:ibm].list_keys.body<commit_msg>[ibm] Change public key format<commit_after>Shindo.tests('Fog::Compute[:ibm] | key requests', ['ibm']) do

  @key_format  = {
    'default'           => Fog::Boolean,
    'instanceIds'       => Array,
    'keyMaterial'       => String,
    'keyName'           => String,
    'lastModifiedTime'  => Integer
  }

  @keys_format = {
    'keys'     => [ @key_format ]
  }

  tests('success') do

    @key_name  = 'fog-test-key' + Time.now.to_i.to_s(32)
    @public_key = '<KEY>'

    tests("#create_key('#{@key_name}')").formats(@key_format) do
      Fog::Compute[:ibm].create_key(@key_name).body
    end

    tests("#create_key('#{@key_name}', '#{@public_key}')").formats(@key_format) do
      Fog::Compute[:ibm].create_key(@key_name, @public_key).body
    end

    tests("#list_keys").formats(@keys_format) do
      Fog::Compute[:ibm].list_keys.body
{'fraction_non_alphanumeric': 0.19966629588431592, 'fraction_numerical': 0.0027808676307007787, 'mean_word_length': 2.9451754385964914, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '5094335', 'n_tokens_mistral': 676, 'n_tokens_neox': 662, 'n_words': 92}