1 tests_path = "/tmp/sdc-tests/"
2 ci_test_suite = "sanity.xml"
5 bash "extract asdc-tests" do
7 [ ! -d /tmp/sdc-tests/ ] && mkdir -p /tmp/sdc-tests
10 /bin/tar -xf /root/chef-solo/cookbooks/sdc-sanity/files/default/asdc-tests.tar --strip-components=1 -C /tmp/sdc-tests
11 chmod -R 755 /tmp/sdc-tests
16 template "sdc-yaml-config" do
17 path "/tmp/sdc-tests/conf/sdc.yaml"
18 source "sdc-sanity.yaml.erb"
23 :target_path => "#{tests_path}/target",
24 :catalogBE_ip => node['Nodes']['BE'],
25 :catalogBE_port => node['BE'][:http_port],
26 :webportal_ip => node['Nodes']['FE'],
27 :webportal_port => node['FE'][:http_port],
28 :titan_file => "/tmp/sdc-tests/conf/titan.properties",
29 :tests_path_ci => "#{tests_path}/CI/tests",
30 :components_path => "#{tests_path}/CI/components",
31 :importResourceConfigDir => "#{tests_path}/CI/importResource",
32 :importTypesDir => "#{tests_path}/CI/importTypesTest",
33 :importResourceTestsConfigDir => "#{tests_path}/CI/importResourceTests",
34 :ConfigurationFile => "#{tests_path}/conf/configuration.yaml",
35 :errorConfigurationFile => "#{tests_path}/conf/error-configuration.yaml",
36 :CASSANDRA_IP => node['Nodes']['CS'],
37 :CASSANDRA_PWD => node['cassandra'][:cassandra_password],
38 :CASSANDRA_USR => node['cassandra'][:cassandra_user]
44 template "titan.properties" do
45 path "/tmp/sdc-tests/conf/titan.properties"
46 source "BE-titan.properties.erb"
51 :CASSANDRA_IP => node['Nodes']['CS'],
52 :CASSANDRA_PWD => node['cassandra'][:cassandra_password],
53 :CASSANDRA_USR => node['cassandra'][:cassandra_user],
54 :DC_NAME => "DC-"+node.chef_environment,
55 :rep_factor => replication_factor
60 bash "run asdc ci sanity tests" do
63 jar_file=`ls asdc-tests-*-jar-with-dependencies.jar`
64 ./startTest.sh $jar_file #{ci_test_suite}
65 echo "return code from startTest.sh = [$?]"