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

NeoEden: add initial tests #1031

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shjala
Copy link
Member

@shjala shjala commented Sep 24, 2024

This is really janky at the moment, but the idea is to get rid of the escrip and write tests using go testing infra.

  1. Goal is to follow two principales, DRY and KISS.
  2. Tests are grouped together (only smoke at the moment)
  3. Tests broken into different categories based on what they test, like just EVE, or App or Network (for now just simple eve tests are ported)
  4. Idea is setup once and use in multiple tests, for example setup and app once and share it between (no-destructive) tests.
  5. This is WIP through and through.

TODO:

  • add documentation

Test

Simply build and prepare :

make clean
make build
make build-tests
./eden config add default
./eden setup
./eden start
./eden eve onboard

and then :

shah@zombie:$ cd neo-eden/workflows/ && ./smoke-tests.sh
Running smoke tests
INFO[0000] EVE Test Suite started                       
configName:  default
configFile:  /home/shah/.eden/contexts/default.yml
=== RUN   TestSmoke
=== RUN   TestSmoke/TestAppArmorEnabled
INFO[0000] TestAppArmorEnabled started                  
DEBU[0000] Will use config from /home/shah/.eden/contexts/default.yml 
DEBU[0000] Try to add config from /home/shah/shah-dev/eden/neo-eden/workflows/eden-config.yml 
INFO[0000] TestAppArmorEnabled finished                 
=== RUN   TestSmoke/TestVcomLinkTpmRequestEK
INFO[0000] TestVcomLinkTpmRequestEK started             
    vcom_test.go:14: Checking if vcomlink is running on EVE
INFO[0000] TestVcomLinkTpmRequestEK finished            
=== RUN   TestSmoke/TestVtpmIsRunningOnEVE
    vtpm_test.go:13: TestVtpmIsRunningOnEVE started
    vtpm_test.go:26: TestVtpmIsRunningOnEVE finished
--- PASS: TestSmoke (0.82s)
    --- PASS: TestSmoke/TestAppArmorEnabled (0.34s)
    --- PASS: TestSmoke/TestVcomLinkTpmRequestEK (0.28s)
    --- PASS: TestSmoke/TestVtpmIsRunningOnEVE (0.20s)
PASS

@shjala shjala marked this pull request as draft September 24, 2024 15:44
@uncleDecart
Copy link
Collaborator

You sure you want to do this in one PR? I mean I'm going to help you all the way through, but my experience with that says we should do it in smaller steps

@shjala
Copy link
Member Author

shjala commented Sep 24, 2024

You sure you want to do this in one PR? I mean I'm going to help you all the way through, but my experience with that says we should do it in smaller steps

hmm make sense, lets me rework it so we can have two eden in parallel.

The idea is to get rid of the escript and write tests using go testing
infra. This is a first step twoards that goal. The main principales are
1. DRY and KISS.
2. Tests are grouped together (only smoke at the moment)
3. Tests broken into different categories based on what they test,
like just EVE, or App or Network (for now just simple eve tests are ported)
5. Setup once and use in multiple tests, for example setup an app once
and share it between (no-destructive) tests.

Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
@shjala shjala marked this pull request as ready for review September 24, 2024 16:54
@shjala shjala changed the title Make eden great again NeoEden: add initial tests Sep 24, 2024
@shjala shjala added the enhancement New feature or request label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants