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

Add a test to ensure test coverage regardless of the vhost order #6873

Merged
merged 3 commits into from Mar 27, 2019

Conversation

joohoi
Copy link
Member

@joohoi joohoi commented Mar 20, 2019

Add a new test to make sure that we are covering all the branches of get_virtual_hosts() regardless of the order that Augeas returns the found VirtualHost paths.

Fixes: #6813

@@ -1521,6 +1522,29 @@ def test_add_vhost_id_already_exists(self):
second_id = self.config.add_vhost_id(self.vh_truth[0])
self.assertEqual(first_id, second_id)

def test_realpath_replaces_symlink(self):
orig_match = self.config.aug.match
mock_vhost = copy.copy(self.vh_truth[0])
Copy link
Member

Choose a reason for hiding this comment

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

nit: Can we use copy.deepcopy so things like the alias attribute don't refer to the same object?

@bmw bmw mentioned this pull request Mar 25, 2019
@bmw
Copy link
Member

bmw commented Mar 25, 2019

Now that #6880 has been resolved, we should be able to bump the minimum coverage in the Apache plugin back to 100% in this PR as well.

@joohoi
Copy link
Member Author

joohoi commented Mar 27, 2019

The coverage requirement is back at 100% now. I wasn't sure if we should add changelog entry for a purely test related PR, so I skipped doing so.

Copy link
Member

@bmw bmw left a comment

Choose a reason for hiding this comment

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

I wasn't sure if we should add changelog entry for a purely test related PR, so I skipped doing so.

I think that's the right call. The way I think about it is if it's something our users or packagers should care about and in this case I don't think it is. It's mainly for devs.

LGTM!

@bmw bmw merged commit b30a5e5 into master Mar 27, 2019
@bmw bmw deleted the apache_vhost_testfail branch March 27, 2019 17:10
@bmw bmw added this to the 0.33.0 milestone Mar 27, 2019
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

2 participants