lf-edge / eden

Eden is where EVE and Adam get tried and tested:
https://projecteve.dev
Apache License 2.0
49 stars 47 forks source link

Need test for baseos image upgrade from within OCI image #539

Open deitch opened 3 years ago

deitch commented 3 years ago

Per the discussion here, as soon as that PR merges into eve, there will be support for getting a baseos image from within an OCI image. We should have a test for upgrading that way, in addition to the current.

@giggsoff and @sadov, can you point me to where the current baseos image upgrade tests are, and we can add another?

sadov commented 3 years ago

At the moment we have a such test to baseos image upgrade: https://github.com/lf-edge/eden/blob/master/tests/update_eve_image/testdata/update_eve_image.txt

deitch commented 3 years ago

@sadov thanks for the pointer.

giggsoff commented 3 years ago

Hi, @deitch. You can try to add your test into separate txt file here. You can take a look onto existing one and change steps of downloading and updating. But before you do it, you should make sure, that Eden works well with something like ./eden controller edge-node eveimage-update oci://eve:version. If you will have problems on this check (manual one, not in test), feel free to open another issue.

Next, the problem here is in merging your future test and existing one into workflow. We should take into account on this step, that EVE have baseOS testing time. Probably, it will make sense to add some kind of teardown into existing test and future one, where we will ask EVE to return onto IMGA.

deitch commented 3 years ago

You can try to add your test into separate txt file here

What is the format of the txt file? Is it its own custom DSL? Or is it using some testing framework?

But before you do it, you should make sure, that Eden works well with something like ./eden controller edge-node eveimage-update oci://eve:version. If you will have problems on this check (manual one, not in test), feel free to open another issue.

It does work. For my test, I ran it with:

  1. I built a new image locally, so it ended up in docker cache
  2. I loaded it with eden registry ...
  3. I updated with eden controller edge-node eveimage-update --registry=local oci://eve:version

I did this for 2 reasons:

I think the right flow is as above, i.e. change something so we get a new version, build an image locally, load it to registry, then update.

How do we do that next?

zed-sadov commented 3 years ago

What is the format of the txt file? Is it its own custom DSL? Or is it using some testing framework?

This is a variant of the EDEN's Go script for writing tests -- Escript: https://github.com/lf-edge/eden/blob/master/tests/README.md https://github.com/lf-edge/eden/blob/master/tests/escript/README.md which mainly uses EDEN commands and binary tests with a little glue logic around them.

giggsoff commented 3 years ago

Can we close this issue? Seems, it is resolved.