Skip to content
Snippets Groups Projects
Commit d3f8e2f9 authored by MJB's avatar MJB
Browse files

fixed hardcoded /varant in production.ini

parent 2e54fb28
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@ import subprocess
def test_write_telegraf_conf():
# test telegraf monitoring configuration
TARGET_ROOT = "/opt/clmc"
TELEGRAF_CONF_DIR = "/etc/telegraf"
LOCATION = "DC1"
SFC_ID = "media_service_A"
......@@ -49,21 +50,21 @@ def test_write_telegraf_conf():
assert code == 0, "Failed to create telegraf include dir : " + str(code) + ", cmd=" + cmd
# run write config template script with no telegraf.d directory
cmd = 'sudo cp /vagrant/scripts/clmc-agent/telegraf.conf /etc/telegraf/'
cmd = 'sudo cp ' + TARGET_ROOT + '/scripts/clmc-agent/telegraf.conf /etc/telegraf/'
(out, err, code) = run_command(cmd)
assert code == 0, "Failed to copy telegraf.conf : " + str(code) + ", cmd=" + cmd
cmd = 'sudo cp /vagrant/scripts/clmc-agent/telegraf_output.conf /etc/telegraf/telegraf.d/'
cmd = 'sudo cp ' + TARGET_ROOT + '/scripts/clmc-agent/telegraf_output.conf /etc/telegraf/telegraf.d/'
(out, err, code) = run_command(cmd)
assert code == 0, "Failed to copy telegraf_output.conf : " + str(code) + ", cmd=" + cmd
# run template relacement script with incorrect arguments
cmd = 'sudo /vagrant/scripts/clmc-agent/configure.sh'
cmd = 'sudo ' + TARGET_ROOT + '/scripts/clmc-agent/configure.sh'
(out, err, code) = run_command(cmd)
assert code == 1, "Failed to return error on incorrect arguments : " + str(code) + ", cmd=" + cmd
# run template relacement script with all arguments
cmd = 'sudo /vagrant/scripts/clmc-agent/configure.sh ' + LOCATION + ' ' + SFC_ID + ' ' + SFC_INSTANCE_ID + ' ' + SF_PACKAGE_ID + ' ' + SF_ID + ' ' + SF_ENDPOINT_ID + ' ' + INFLUXDB_URL
cmd = 'sudo ' + TARGET_ROOT + '/scripts/clmc-agent/configure.sh ' + LOCATION + ' ' + SFC_ID + ' ' + SFC_INSTANCE_ID + ' ' + SF_PACKAGE_ID + ' ' + SF_ID + ' ' + SF_ENDPOINT_ID + ' ' + INFLUXDB_URL
(out, err, code) = run_command(cmd)
assert code == 0, "Configure command returned error, output=" + str(out) + ", cmd=" + cmd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment