← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~vaishnavi-asawale/launchpad:fetch-service-charmcraft into launchpad:master

 


Diff comments:

> diff --git a/lib/lp/charms/tests/test_charmrecipe.py b/lib/lp/charms/tests/test_charmrecipe.py
> index 5d71bd0..a5fb809 100644
> --- a/lib/lp/charms/tests/test_charmrecipe.py
> +++ b/lib/lp/charms/tests/test_charmrecipe.py
> @@ -2224,6 +2220,27 @@ class TestCharmRecipeSet(TestCaseWithFactory):
>                      field_value,
>                  )
>  
> +    def test_use_fetch_service(self):
> +        [ref] = self.factory.makeGitRefs()
> +        charm = self.factory.makeCharmRecipe(
> +            git_ref=ref, use_fetch_service=False
> +        )
> +        self.assertEqual(False, charm.use_fetch_service)
> +        self.assertEqual(FetchServicePolicy.STRICT, charm.fetch_service_policy)
> +        with person_logged_in(charm.owner):
> +            charm.use_fetch_service = True
> +            charm.fetch_service_policy = FetchServicePolicy.PERMISSIVE
> +            self.assertEqual(True, charm.use_fetch_service)

I do not think the assert statements need to be indented in the with statement?

> +            self.assertEqual(
> +                FetchServicePolicy.PERMISSIVE, charm.fetch_service_policy
> +            )
> +
> +    def test_use_fetch_service_not_passed(self):

Could you please either rename the test case and/or add a description to make it more obvious what this test is checking?

I think this is checking that by default the fetch service is not used, so it is opt-in only.

> +        [ref] = self.factory.makeGitRefs()
> +        charm = self.factory.makeCharmRecipe(git_ref=ref)
> +        self.assertEqual(False, charm.use_fetch_service)
> +        self.assertEqual(FetchServicePolicy.STRICT, charm.fetch_service_policy)
> +
>  
>  class TestCharmRecipeWebservice(TestCaseWithFactory):
>      layer = LaunchpadFunctionalLayer


-- 
https://code.launchpad.net/~vaishnavi-asawale/launchpad/+git/launchpad/+merge/491222
Your team Launchpad code reviewers is requested to review the proposed merge of ~vaishnavi-asawale/launchpad:fetch-service-charmcraft into launchpad:master.



References