Project

General

Profile

action #62465

Updated by riafarov over 4 years ago

## Description 
 In #60392 we figured out that we only check that network was restarted. 
 Method we use is running `journalctl -f|egrep -i --line-buffered 'shutting down|ifdown all' > journal.log &`  
 so we follow journal output and see if there was any restart. 

 We also have a change in the product behavior, that we reload service instead of restart. For those we might need to file bugs in case scenario doesn't work. 

 ## Acceptance criteria 
 1. Network not being restarted is validated in case no restart is expected or corresponding bugs are filed 

 ## Further details 
 There are following problems with the approach. 
 1. Debug level for wicked is set in WICKED_LOG_LEVEL and not with DEBUG setting (service needs to be at least reloaded) 
 2. Latest wicked version doesn't use `shutting down|ifdown all` messages, but 'stopping wicked...'  
 3. For validation we have: 
 ``` 
   if ($expected_status eq 'restart') { 
         assert_script_run '[ -s journal.log ]';                         # journal.log size is greater than zero (network restarted) 
   
     } 
 ``` 
 

 So in case no restart is triggered, we don't check that file is empty. 

 https://openqa.suse.de/tests/latest?arch=x86_64&distri=sle&flavor=Online&machine=64bit&test=yast2_gui&version=15-SP2 

 assert_script_run 'sed -i -E \'s/(WICKED_LOG_LEVEL).*/\1="info"/\' /etc/sysconfig/network/config';

Back