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

run tests from docker image directly #556

Merged
merged 1 commit into from
Mar 19, 2021
Merged

Conversation

deitch
Copy link
Contributor

@deitch deitch commented Mar 11, 2021

This adds tests to update the image from an OCI image directly.

It uses version 6.1.0. I checked, and that version does, indeed, have the right labels to work.

A few open questions:

  1. Did I do this correctly? Added a test line to tests/update_eve_image/eden.update_eve_image.tests.txt, and then the test in tests/update_eve_image/testdata/update_eve_image_oci.txt
  2. Should we be resetting the image back to the base (pre-update) in testdata/update_eve_image.txt before running the next test? Should we in testdata/update_eve_image_oci.txt? If so, how do we do it?

@deitch deitch requested a review from mydatascience March 11, 2021 17:24
@deitch
Copy link
Contributor Author

deitch commented Mar 11, 2021

Fixes #539

@giggsoff
Copy link
Collaborator

Hi, @deitch
Yes, you done it correctly.

Seems, we should return to the tested (pre-update) version somehow. There are several reasons for it:

  • We want to test pre-update version of EVE
  • We want the test not to affect the following

But for now I cannot find how to return back to pre-update version. After update we have testing time, we can return to previous version automatically in the case of crash. But we cannot fire reboot in this time. Also, I tried to reset config to the empty one with ./eden eve reset and that didn't work for me either.

@deitch
Copy link
Contributor Author

deitch commented Mar 12, 2021

So we agree we should do it, but we don't know how :-)

@rvs got ideas?

@rvs
Copy link
Contributor

rvs commented Mar 16, 2021

What exactly is your question @deitch ?

@deitch
Copy link
Contributor Author

deitch commented Mar 16, 2021

Nothing any more @rvs ; @giggsoff wanted to have a way to reset the image after an image update, but wasn't sure how to do it. But I think he figured it out, see #558. Once he has that merged in, I will be able to rebase this one. If it passes, we can merge it in.

@deitch
Copy link
Contributor Author

deitch commented Mar 18, 2021

Now that #558 is merged in, I rebased this on that, added the reset, and will let this run.

@deitch
Copy link
Contributor Author

deitch commented Mar 18, 2021

This looks clean now. Put a review on @giggsoff please

@giggsoff
Copy link
Collaborator

Hi, @deitch. Please add your test into workflow after lines

/bin/echo Eden base OS update (34/{{$tests}})
eden.escript.test -testdata ../update_eve_image/testdata/ -test.run TestEdenScripts/update_eve_image_http

Also, you should change version inside your test. For now, version 6.1.0 is the version of builded image in Eden by default
DefaultEVETag = "6.1.0" //DefaultEVETag tag for EVE image

@deitch
Copy link
Contributor Author

deitch commented Mar 18, 2021

Sure thing.

@deitch
Copy link
Contributor Author

deitch commented Mar 18, 2021

Done @giggsoff take another look at it

@deitch
Copy link
Contributor Author

deitch commented Mar 18, 2021

The tests failed, I messed up the oci:// URL. Just fixed it and pushed again.

@deitch
Copy link
Contributor Author

deitch commented Mar 18, 2021

Looks like it passed CI. Huzzah! Back at you @giggsoff

Comment on lines 29 to 31
# Run monitoring of Info messages to obtain info with PartitionState inprogress or active and previously defined ShortVersion
message 'Waiting for EVE update...'
{{$test}} -out InfoContent.dinfo.SwList[0].ShortVersion 'InfoContent.dinfo.SwList[0].PartitionState:inprogress|active InfoContent.dinfo.SwList[0].ShortVersion:{{ $short_version }}'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually it is discussible, but, in case of subsequent revert, we should wait for active (not inprogress or active) state here. You can decrease testing time to do it faster like inside

eden controller edge-node update --config timer.test.baseimage.update=30

WDYT, @deitch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I am ok either way. Whatever you want, either take this as is, or tell me you prefer with just active and I will change it

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest you to change to active and modify testing time. Without it we just move our waiting onto nested script (revert_eve_image_update).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you!

Copy link
Collaborator

@giggsoff giggsoff left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@deitch deitch merged commit 3313156 into lf-edge:master Mar 19, 2021
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.

3 participants