<commit_before>#!/usr/bin/env ruby
# This is DTK Server smoke test used for execution in DTK Release process

require 'rubygems'
require 'rest_client'
require 'pp'
require 'json'
require 'awesome_print'
require File.join(File.dirname(__FILE__), '../..', 'lib/dtk_common')
require File.join(File.dirname(__FILE__), '../..', 'lib/assembly_and_service_operations_spec')
require File.join(File.dirname(__FILE__), '../..', 'lib/parameters_setting_spec')
require File.join(File.dirname(__FILE__), '../..', 'lib/component_modules_spec')
require File.join(File.dirname(__FILE__), '../..', 'lib/service_modules_spec')

# assuming that the tenant is already linked to repoman
#catalog_username = ENV['tenant_user'] || "dtk16"
#catalog_password = ENV['tenant_user_password'] || "password"
tenant_server = ENV['tenant_server'] || "dtk1.dtk.io"
tenant_username = ENV['username'] || "dtk1"
tenant_password = ENV['tenant_password'] || "password"
service_name = 'dtk_release_smoke_test'
assembly_name = 'test_service::node_with_params'
os_templates = ['precise']
os_attribute = 'os_identifier'
memory_size = 't1.micro'
memory_size_attribute = 'memory_size'
node_name = 'node1'
component_module_name = "test_module"
local_component_module_name = 'internal:test_module'
service_module_name = "test_service"
local_service_module_name = 'internal:test_service'
namespace = 'internal'
# local_default_namespace = 'dtk16'
component_module_filesystem_location = "~/dtk/component_modules"
rvm_path = "/usr/local/rvm/wrappers/default/"

dtk_common = DtkCommon.new(service_name, assembly_name)
dtk_common.server = tenant_server
dtk_common.endpoint = "https://#{tenant_server}:443"
dtk_common.username = tenant_username
dtk_common.password = <PASSWORD>
dtk_common.login

describe "DTK Server smoke test release" do

  before(:all) do
    puts "*****************************",""
  end

  context "Install service module" do
    include_context "Import remote service module", namespace + ':' + service_module_name
  end

  context "Get component module components list" do
    include_context "Get component module components list", dtk_common, local_component_module_name
  end

  os_templates.each do |os|
    context "Stage service function on #{assembly_name} assembly" do
      include_context "Stage", dtk_common
    end
<commit_msg>Set catalog creds in upgrade smoke<commit_after>#!/usr/bin/env ruby
# This is DTK Server smoke test used for execution in DTK Release process

require 'rubygems'
require 'rest_client'
require 'pp'
require 'json'
require 'awesome_print'
require File.join(File.dirname(__FILE__), '../..', 'lib/dtk_common')
require File.join(File.dirname(__FILE__), '../..', 'lib/assembly_and_service_operations_spec')
require File.join(File.dirname(__FILE__), '../..', 'lib/parameters_setting_spec')
require File.join(File.dirname(__FILE__), '../..', 'lib/component_modules_spec')
require File.join(File.dirname(__FILE__), '../..', 'lib/service_modules_spec')

# assuming that the tenant is already linked to repoman
catalog_username = "public-internal"
catalog_password = "<PASSWORD>"
tenant_server = ENV['tenant_server'] || "dtk1.dtk.io"
tenant_username = ENV['username'] || "dtk1"
tenant_password = ENV['tenant_password'] || "password"
service_name = 'dtk_release_smoke_test'
assembly_name = 'test_service::node_with_params'
os_templates = ['precise']
os_attribute = 'os_identifier'
memory_size = 't1.micro'
memory_size_attribute = 'memory_size'
node_name = 'node1'
component_module_name = "test_module"
local_component_module_name = 'internal:test_module'
service_module_name = "test_service"
local_service_module_name = 'internal:test_service'
namespace = 'internal'
# local_default_namespace = 'dtk16'
component_module_filesystem_location = "~/dtk/component_modules"
rvm_path = "/usr/local/rvm/wrappers/default/"

dtk_common = DtkCommon.new(service_name, assembly_name)
dtk_common.server = tenant_server
dtk_common.endpoint = "https://#{tenant_server}:443"
dtk_common.username = tenant_username
dtk_common.password = <PASSWORD>
dtk_common.login

describe "DTK Server smoke test release" do

  before(:all) do
    puts "*****************************",""
  end

  context "Set catalog credentials" do
    include_context "Set catalog credentials", dtk_common, catalog_username, catalog_password
  end

  context "Install service module" do
    include_context "Import remote service module", namespace + ':' + service_module_name
  end

  context "Get component module components list" do
    include_context "Get component module components list", dtk_common, local_component_module_name
  end

  os_templates.each do |os|
    context "Stage service function on #{assembly_name} assembly" do
      include_context "Stage", dtk_common
    end

{'fraction_non_alphanumeric': 0.1308016877637131, 'fraction_numerical': 0.004219409282700422, 'mean_word_length': 6.2603369065849925, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, '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': '3520791', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1481, 'n_words': 338}