Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give default value for uninitialized response code #4452

Merged
merged 1 commit into from Jan 17, 2022

Conversation

FruitFly638
Copy link
Contributor

@FruitFly638 FruitFly638 commented Jan 17, 2022

res_code isn't initialized if no openQA server is running.
It now defaults to 0 if there is no connection, the "Connection refused" message still appears.

https://progress.opensuse.org/issues/104836

Comment on lines 56 to 57
my $res_code = $tx->res->code;
$res_code //= 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
my $res_code = $tx->res->code;
$res_code //= 0;
my $res_code = $tx->res->code // 0;

@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #4452 (c6fc70c) into master (4516dcb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4452   +/-   ##
=======================================
  Coverage   97.95%   97.95%           
=======================================
  Files         374      374           
  Lines       34006    34006           
=======================================
  Hits        33312    33312           
  Misses        694      694           
Impacted Files Coverage Δ
lib/OpenQA/CLI/api.pm 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4516dcb...c6fc70c. Read the comment docs.

progress.opensuse.org/issues/104836
@mergify mergify bot merged commit 3a5d88d into os-autoinst:master Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants