<commit_before>#!/usr/bin/env ruby
#Test Case 28: Import component module from remote and use this component in assembly

require 'rubygems'
require 'rest_client'
require 'pp'
require 'json'
require 'awesome_print'
require './test/lib/dtk_common'
require './test/lib/shared_spec'

assembly_name = 'test_case_28_instance'
assembly_template = 'bootstrap::node_with_params'
os = 'natty'
node_name = 'node1'
module_name = "mysql"
module_filesystem_location = "~/component_modules"
$assembly_id = 0
#Initial empty module components list, will be populated after "Get module components list" context call
$module_components_list = Array.new()

dtk_common = DtkCommon.new(assembly_name, assembly_template)

describe "Test Case 28: Import component module from remote and use this component in assembly" do

	context "Import module #{module_name} function" do
		#include_context "Import remote module", dtk_common, module_name
		it "Imports module" do
			value = `dtk module import #{module_name}`
			puts value
			value.should_not eq(nil)
		end
	end

	context "Get module components list" do<commit_msg>Changes in test scripts<commit_after>#!/usr/bin/env ruby
#Test Case 28: Import component module from remote and use this component in assembly

require 'rubygems'
require 'rest_client'
require 'pp'
require 'json'
require 'awesome_print'
require './test/lib/dtk_common'
require './test/lib/shared_spec'

assembly_name = 'test_case_28_instance'
assembly_template = 'bootstrap::node_with_params'
os = 'natty'
node_name = 'node1'
module_name = "mysql"
module_filesystem_location = "~/component_modules"
$assembly_id = 0
#Initial empty module components list, will be populated after "Get module components list" context call
$module_components_list = Array.new()

dtk_common = DtkCommon.new(assembly_name, assembly_template)

describe "Test Case 28: Import component module from remote and use this component in assembly" do

	context "Import module #{module_name} function" do
		include_context "Import remote module", dtk_common, module_name
	end

	context "Get module components list" do
{'fraction_non_alphanumeric': 0.08645533141210375, 'fraction_numerical': 0.007684918347742555, 'mean_word_length': 6.013468013468014, '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': '373599', 'n_tokens_mistral': 647, 'n_tokens_neox': 611, 'n_words': 214}