Repository navigation
add support to copy and search the server log file for errors - #35
Conversation
|
You might want to try adding this directly to the smashbox framework instead of requiring every test to add an additional step. |
|
Actually, I agree. Where in the framework/test execution do you recommend this goes? |
|
I think the ideal and standard approach should be:
It should be also possible to add a global setup for all the tests, and a global tear down. This is what other frameworks offer. I don't know if there is support to do this or we need to add it |
|
Maybe put this here https://github.com/owncloud/smashbox/blob/master/bin/smash#L203 or here https://github.com/owncloud/smashbox/blob/master/bin/smash#L158 after a single test has finished running. |
|
I never thought to put it in the smash file ;) Let me look at that. I could even make it an argument with a default of True |
There was a problem hiding this comment.
Changing this to from smashbox.utilities import runcmd seems to make it import "runcmd", but then "runcmd" for some reason cannot find the global logger...
Also it seems that the global logger is not available in this module, even though it's available in init during a test run. Maybe the multi processing engine normally creates the logger instance somehow...
I still don't understand it. It's too convoluted.
|
I think one clue is that normally all functions inside "utilities" are usually called from inside the multiprocessing engine, which itself defines the global "logger" instance. But in your case, it's outside. It's another logger, and it's not global, only defined in the scope of "main()": https://github.com/owncloud/smashbox/blob/master/bin/smash#L68 Now need to find a way to make this all work |
|
I'll see if Kuba can help. |
|
In chatting with Kuba, he pointed out that each test makes a call to reset_rundir, which will delete the directory needed to hold the owncloud.log file for each test run. I ended up keeping the original approach of making the calls on a per test basis but combined the test setup and teardown methods into one. |
|
@PVince81 @SergioBertolinSG @jvillafanez for review again |
|
@PVince81 @jvillafanez @SergioBertolinSG ping - I'd like to merge this code today. Thanks! |
|
If we're going to keep that approach, then it's fine. |
|
👍 |
add support to copy and search the server log file for errors
Fix server scrape log (by owncloud).
Not the cleanest approach but it gets us the needed files
@PVince81 @SergioBertolinSG @jvillafanez for review