<commit_before>#!/usr/bin/env ruby
#Test Case 20: Import service from remote repo and check its corresponding assembly templates

require 'rubygems'
require 'rest_client'
require 'pp'
require 'json'
require 'awesome_print'
require './lib/dtk_common'
require './lib/assembly_operations_spec'
require './lib/services_spec'

assembly_template1 = 'redhat_bigtop_namenode'
assembly_template2 = 'redhat_hdp_namenode'
service_name = 'bakir_test_apache'
service_namespace = 'r8'
service_filesystem_location = '~/dtk/service_modules'
$assembly_id = 0

dtk_common = DtkCommon.new('', '')

describe "(Modules, Services and Versioning) Test Case 20: Import service from remote repo and check its corresponding assembly templates" do

  before(:all) do
    puts "*******************************************************************************************************************************"
    puts "(Modules, Services and Versioning) Test Case 20: Import service from remote repo and check its corresponding assembly templates"
    puts "*******************************************************************************************************************************"
    puts ""
  end

  context "Import service function" do
    include_context "Import remote service", dtk_common, service_namespace + "/" + service_name
  end

  context "List all services" do
    include_context "List all services", dtk_common, service_name
  end

  context "Check if #{assembly_template1} assembly_template belongs to #{service_name} service" do
    include_context "Check if assembly template belongs to the service", dtk_common, service_name, assembly_template1
  end

  context "Check if #{assembly_template2} assembly_template belongs to #{service_name} service" do
    include_context "Check if assembly template belongs to the service", dtk_common, service_name, assembly_template2
  end

  context "Delete service function" do
    include_context "Delete service", dtk_common, service_name
  end

  context "Delete service from local filesystem" do<commit_msg>small fix rspec test - no_build<commit_after>#!/usr/bin/env ruby
#Test Case 20: Import service from remote repo and check its corresponding assembly templates

require 'rubygems'
require 'rest_client'
require 'pp'
require 'json'
require 'awesome_print'
require './lib/dtk_common'
require './lib/assembly_operations_spec'
require './lib/services_spec'

assembly_template1 = 'test_apache'
service_name = 'bakir_test_apache'
service_namespace = 'r8'
service_filesystem_location = '~/dtk/service_modules'
$assembly_id = 0

dtk_common = DtkCommon.new('', '')

describe "(Modules, Services and Versioning) Test Case 20: Import service from remote repo and check its corresponding assembly templates" do

  before(:all) do
    puts "*******************************************************************************************************************************"
    puts "(Modules, Services and Versioning) Test Case 20: Import service from remote repo and check its corresponding assembly templates"
    puts "*******************************************************************************************************************************"
    puts ""
  end

  context "Import service function" do
    include_context "Import remote service", dtk_common, service_namespace + "/" + service_name
  end

  context "List all services" do
    include_context "List all services", dtk_common, service_name
  end

  context "Check if #{assembly_template1} assembly_template belongs to #{service_name} service" do
    include_context "Check if assembly template belongs to the service", dtk_common, service_name, assembly_template1
  end

  context "Delete service function" do
    include_context "Delete service", dtk_common, service_name
  end

  context "Delete service from local filesystem" do
{'fraction_non_alphanumeric': 0.19984326018808776, 'fraction_numerical': 0.006530825496342737, 'mean_word_length': 6.143656716417911, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1218919', 'n_tokens_mistral': 981, 'n_tokens_neox': 941, 'n_words': 338}