You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/10/01 15:53:51 UTC

[GitHub] [trafficserver] dragon512 edited a comment on issue #6387: Format output of AuTest

dragon512 edited a comment on issue #6387:
URL: https://github.com/apache/trafficserver/issues/6387#issuecomment-702228728


   So I think there are few requests/questions here.
   
   First is there a cleaner way to format?
   
   We do have format strings in python now.. so a statement as
    `test_run.Processes.Default.Command = "curl -vs -k --http2 https://127.0.0.1:{0}/get | {1}".format( 
        ts.Variables.ssl_port, json_printer) ` 
   can now be stated as 
   `test_run.Processes.Default.Command = f"curl -vs -k --http2 https://127.0.0.1:{ts.Variables.ssl_port}/get | {json_printer}"`
   
   note the string has a 'f' in front. link to technical spec https://www.python.org/dev/peps/pep-0498/
   
   Then is the issue of the formatting of output for testing. The intent is that gold test file tester will compare and do what is needed. However I have seen a few patterns in our tests that need to be addressed in some way. I will list them out here:
   
   1) related to the #6378, we want may want to test text and ignore whitespace ( at the moment we only have a way to deal with newlines)
   2) We have a number of tests that for various reason try to reduce the output to something smaller to be tested, instead of the intended test the whole blob with escapes to ignore sections of text. However I believe there are two items that can make this hard.
   
   - we have gold files with a mix of \r\n and \n. These difference are important to not, however hard to edit manually. Also these differences do not show well in the diff, making it hard to know what is going on. Many tests I see doing this add a new line to the goldfile that is the cause of the "diff" failure
   - we don't have a tool in AuTest to easily test and see what is going on when trying to make a gold file with escapes. 
   
   I have opened in Autest issues:
   - https://bitbucket.org/autestsuite/reusable-gold-testing-system/issues/15/gold-tester-need-to-so-differences-in
   - https://bitbucket.org/autestsuite/reusable-gold-testing-system/issues/16/autest-should-ship-with-a-tool-to-help-the
   
   to help address this problem


----------------------------------------------------------------
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:
users@infra.apache.org