<commit_before>/*
 * Telefónica Digital - Product Development and Innovation
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
 *
 * Copyright (c) Telefónica Investigación y Desarrollo S.A.U.
 * All rights reserved.
 */

package es.tid.cosmos.servicemanager.ambari.services

import es.tid.cosmos.servicemanager.configuration.ConfigurationKeys.InfinityMasterNode
import es.tid.cosmos.servicemanager.services.InfinityDriver.InfinityDriverParameters

class InfinityDriverIT extends ConfiguredServiceTest {

  override val dynamicProperties = Map(
    InfinityMasterNode -> "andromeda-infinity"
  )

  override def configurator = AmbariInfinityDriver.configurator(
    InfinityDriverParameters("secret"), resourcesConfigDirectory)

  val contributedConfig = contributions.core.get

  "An infinity service" must "only have core contributions" in {
    contributions.global must not be 'defined
    contributions.core must be ('defined)
    contributions.services must be ('empty)
  }

  it must "have the default infinity's cluster configured" in {
    contributedConfig.properties("fs.infinity.defaultAuthority") must be ("andromeda-infinity:50070")
  }

  it must "configure the infinity HFS driver" in {
    contributedConfig.properties("fs.infinity.impl").toString must include ("InfinityFileSystem")
  }
}
<commit_msg>Fix ITs<commit_after>/*
 * Telefónica Digital - Product Development and Innovation
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
 *
 * Copyright (c) Telefónica Investigación y Desarrollo S.A.U.
 * All rights reserved.
 */

package es.tid.cosmos.servicemanager.ambari.services

import es.tid.cosmos.servicemanager.configuration.ConfigurationKeys.InfinityMasterNode
import es.tid.cosmos.servicemanager.services.InfinityDriver.InfinityDriverParameters

class InfinityDriverIT extends ConfiguredServiceTest {

  override val dynamicProperties = Map(
    InfinityMasterNode -> "andromeda-infinity"
  )

  override def configurator = AmbariInfinityDriver.configurator(
    InfinityDriverParameters("secret"), resourcesConfigDirectory)

  val contributedConfig = contributions.core.get
  val serviceConfig = contributions.services.head

  "An infinity service" must "only have core and service contributions" in {
    contributions.global must not be 'defined
    contributions.core must be ('defined)
    contributions.services must have length (1)
  }

  it must "have the default infinity's cluster configured" in {
    contributedConfig.properties("fs.infinity.defaultAuthority") must be ("andromeda-infinity:50070")
  }

  it must "configure the infinity HFS driver" in {
    contributedConfig.properties("fs.infinity.impl").toString must include ("InfinityFileSystem")
  }

  it must "provide a list of ports to be blocked" in {
    serviceConfig.properties("blocked_ports").toString must include ("8088")
  }
}

{'fraction_non_alphanumeric': 0.07829627309740056, 'fraction_numerical': 0.004697776385844034, 'mean_word_length': 4.839122486288848, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3442329', 'n_tokens_mistral': 883, 'n_tokens_neox': 842, 'n_words': 266}