randall commented on a change in pull request #6699:
URL: https://github.com/apache/trafficserver/pull/6699#discussion_r444518072
##########
File path: tests/gold_tests/autest-site/when.test.ext
##########
@@ -34,3 +35,20 @@ def FileContains(haystack, needle):
AddWhenFunction(FileContains)
+
+def FilePresent(tsenv, file):
+ cmd = "test -f {0}".format(file)
+ retval = subprocess.run(cmd, shell=True, env=tsenv)
+ return retval.returncode == 0
+
+AddWhenFunction(FilePresent)
+
+def SNIReloadDone(tsenv, diags_file):
+ cmd = "grep 'sni.yaml finished loading' {0} | wc -l | sed -e 's/ //g'>
./test.out".format(diags_file)
+ retval = subprocess.run(cmd, shell=True, env=tsenv)
+ if retval.returncode == 0:
+ cmd ="if [ -f ./test.out -a \"`cat ./test.out`\" = \"2\" ] ; then
true; else false; fi"
Review comment:
like ?
```
cmd = 'if [ -f ./test.out -a "`cat ./test.out`" = "2" ] ; then true; else
false; fi'
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]