Remove dead code
There was step defined but not being used and a helper method only being
called from that step. This commit removes both.
Author: Nadeem Ghani
Author: Shoaib Lari
@@ -4136,12 +4136,6 @@ def impl(context, utilname, dirname):
raise Exception('Logs matching "%s" were not created' % pattern)
-def get_log_name(utilname, logdir):
- today = datetime.now()
- logname = "%s/%s_%s.log" % (logdir, utilname, today.strftime('%Y%m%d'))
- return logname
-
-
@then('verify that a log was created by {utilname} in the "{dirname}" directory')
def impl(context, utilname, dirname):
if not os.path.exists(dirname):
@@ -4172,36 +4166,6 @@ def impl(context, tablename, dbconn):
run_gpcommand(context, command)
-# gptransfer must be run in verbose mode (-v) with default log location when using this step
-@then('verify that gptransfer has a sub batch size of "{num}"')
-def impl(context, num):
- num = int(num)
- log_dir = _get_gpAdminLogs_directory()
- if not os.path.exists(log_dir):
- raise Exception('No such directory: %s' % log_dir)
- log_name = get_log_name('gptransfer', log_dir)
-
- full_path = os.path.join(log_dir, log_name)
-
- if not os.path.isfile(full_path):
- raise Exception("Can not find file: %s" % full_path)
-
- # todo why open file if we don't care about contents?
- with open(full_path) as fd:
- fd.read()
-
- for i in range(num):
- worker = "\[DEBUG\]:-\[worker%d\]" % i
- try:
- check_stdout_msg(context, worker)
- except:
- raise Exception("gptransfer sub batch size should be %d, is %d" % (num, i))
-
- worker = "\[DEBUG\]:-\[worker%d\]" % num
- try:
- check_string_not_present_stdout(context, worker)
- except:
- raise Exception("gptransfer sub batch size should be %d, is at least %d" % (num, num + 1))
def _get_gpAdminLogs_directory():
