File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use Mojo::Util 'trim';
1010use Config::IniFiles;
1111use Time::Seconds;
1212use OpenQA::Config;
13- use OpenQA::Log ' setup_log' ;
13+ use OpenQA::Log qw( setup_log log_info ) ;
1414use OpenQA::Utils ' is_host_local' ;
1515use Net::Domain ' hostfqdn' ;
1616
@@ -23,7 +23,8 @@ use constant VNCPORT_OFFSET => $ENV{VNCPORT_OFFSET} // 90;
2323sub new ($class , $instance_number = undef , $cli_options = {}) {
2424 my $config_paths = lookup_config_files(undef , ' workers.ini' , 1);
2525 my $cfg = parse_config_files($config_paths );
26- my @parse_errors = @$config_paths ? (@Config::IniFiles::errors ) : (' No config file found.' );
26+ my @parse_errors = @$config_paths ? (@Config::IniFiles::errors ) : ();
27+ log_info ' workers.ini not found, using default settings' unless @$config_paths ;
2728
2829 # read settings from config
2930 my %global_settings ;
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ subtest 'settings file not found' => sub {
127127 $config_mock -> redefine(_config_dirs => [[' does not exist' ]]);
128128 my $settings = OpenQA::Worker::Settings-> new(1);
129129 ok !$settings -> file_path, ' no file path present' ;
130- is_deeply $settings -> parse_errors, [' No config file found. ' ], ' error logged '
130+ is_deeply $settings -> parse_errors, [], ' no parse errors if file is missing '
131131 or always_explain $settings -> parse_errors;
132132};
133133
You can’t perform that action at this time.
0 commit comments