[Avocado-devel] Practical use of `expire` argument on Asset class

Amador Pahim amador at pahim.org
Mon Dec 9 19:55:18 UTC 2019


On Mon 9 Dec 2019, 6:51 p.m. Willian Rampazzo, <wrampazz at redhat.com> wrote:

> On Mon, Dec 9, 2019 at 3:44 PM Amador Pahim <amador at pahim.org> wrote:
> >
> > Hi Willian,
> >
> > On Mon, Dec 9, 2019 at 6:08 PM Willian Rampazzo <wrampazz at redhat.com>
> wrote:
> > >
> > > Greetings,
> > >
> > > I was looking at the Asset class and could not think about a practical
> > > use of the `expire` argument. Does anyone have an example to make it
> > > clear for me?
> >
> > The use-case that led to its implementation was the download of a
> > github repository as zip. E.g.
> > https://github.com/avocado-framework/avocado/archive/master.zip.
> > Users wanted to somehow control how frequently they would download
> > again from master.
>
> Okay, I got it. In this case, there is no reason to use the asset_hash
> argument as it may change every time the `master.zip` file in the
> example is recreated due to repository changes.
>

Right. Files that change the content while keeping the name is the use case
for optional hash check.


> >
> > Hope that's helpful.
> >
>
> Thank you for the quick response!
>
> > Best,
> > --
> > apahim
> >
> > >
> > > Thanks in advance,
> > >
> > > Willian
> > >
> > >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20191209/5dd062c4/attachment.htm>


More information about the Avocado-devel mailing list