Diff comments:

> 
> === modified file 'lib/lp/archiveuploader/tests/test_snapupload.py'
> --- lib/lp/archiveuploader/tests/test_snapupload.py   2016-06-28 21:10:18 
> +0000
> +++ lib/lp/archiveuploader/tests/test_snapupload.py   2016-08-30 12:36:14 
> +0000
> @@ -62,6 +63,23 @@
>          self.assertEqual(BuildStatus.FULLYBUILT, self.build.status)
>          self.assertTrue(self.build.verifySuccessfulUpload())
>  
> +    def test_requires_snap(self):
> +        # The upload processor fails if the upload does not contain any
> +        # .snap files.
> +        self.assertFalse(self.build.verifySuccessfulUpload())
> +        upload_dir = os.path.join(
> +            self.incoming_folder, "test", str(self.build.id), "ubuntu")
> +        write_file(os.path.join(upload_dir, "wget_0_all.manifest"), 
> "manifest")
> +        handler = UploadHandler.forProcessor(
> +            self.uploadprocessor, self.incoming_folder, "test", self.build)
> +        result = handler.processSnap(self.log)
> +        self.assertEqual(UploadStatusEnum.REJECTED, result)
> +        self.assertIn(
> +            "ERROR Build did not produce any snap packages.",
> +            self.log.getLogBuffer())
> +        self.assertEqual(BuildStatus.UPLOADING, self.build.status)

It's actually a higher layer that eventually sets that to FAILEDTOUPLOAD.  That 
general behaviour is tested elsewhere, but for here I've just removed the 
misleading assertion.

> +        self.assertFalse(self.build.verifySuccessfulUpload())
> +
>      def test_triggers_store_uploads(self):
>          # The upload processor triggers store uploads if appropriate.
>          self.pushConfig(


-- 
https://code.launchpad.net/~cjwatson/launchpad/snap-upload-check-filename/+merge/304369
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to