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

DBG - break line that coverage says is not executed #2006

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mvollmer
Copy link
Member

No description provided.

The listening address is most likely 127.0.0.1 (libvirt default) or
0.0.0.0 (yolo config). Neither of these works remotely.

Let's tell the remote viewer some address that has a chance of
working. More complicated setups, like a bastion host or connecting
via SSH inside Cockpit, might not work because of networking routing
challanges, but at least we get better error messages like "No route
to host" etc.

Also, with the libvirt default of only listening on 127.0.0.1, no
remote connection will work. But again, we now at least get the
expected "Connection refused" error message.
Comment on lines +96 to +97
if (app.startsWith("cockpit+=")) {
address = "wrong:" + app.substr(9);
Copy link
Contributor

Choose a reason for hiding this comment

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

These 2 added lines are not executed by any test.

Copy link
Member Author

Choose a reason for hiding this comment

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

The test failure shows the wrong value that is computed here. Hmm. Maybe the coverage collection goes wrong across logouts?

Comment on lines +102 to +105
address = cockpit.transport.host;
const pos = address.indexOf("@");
if (pos >= 0) {
address = address.substr(pos + 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

These 4 added lines are not executed by any test.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is expected, the test aborts before reaching the part that executes this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants