1 of 22

EVE/Eden testing

Pavel Abramov: 27.06.2024

1

2 of 22

Disclaimer

This presentation is intended to be a discussion, so please

  • Interrupt me
  • Ask questions

2

CONFIDENTIAL

3 of 22

Agenda

  • EVE CI/CD overview
  • What kind of tests we have
  • Writing service tests in EVE: pubsub memdriver
  • Writing end-to-end tests in Eden
  • Future of Eden

3

4 of 22

EVE CI/CD

4

5 of 22

EVE Schematically

5

6 of 22

Eden tests

6

7 of 22

Eden tests: running

7

# In EVE repository

make eve

# In eden repository

make clean && make build-tests

./eden config add default

./eden setup --eve-tag 0.0.0-master-fc76ffe3 # <- this is from make version in eve repo

./dist/bin/eden+ports.sh 2223:2223 2224:2224 5912:5902 5911:5901 8027:8027 8028:8028 8029:8029 8030:8030 8031:8031

./eden start

./eden eve onboard

./eden test tests/workflow -s smoke.tests.txt

8 of 22

EVE tests

8

9 of 22

EVE IPC

9

Service

#ps

zedrouter

20

zedagent

43

zedmanager

18

volumemgr

23

nim

19

downloader

10

domainmgr

12

10 of 22

Tests in EVE: pubsub memdriver

10

11 of 22

Writing service tests in EVE: pubsub memdriver

11

12 of 22

Writing service tests in EVE: pubsub memdriver

12

13 of 22

Writing service tests in EVE: pubsub memdriver

13

14 of 22

Writing service tests in EVE: pubsub memdriver

Note, because of implementation, during testing all PubSubs should be persistent

14

15 of 22

Escript: concept

  • Use Domain Specific Language (DSL) to describe test
  • File can contain configuration information as well as bash helpers
  • There is golang test program, which is compiled and used in this DSL (test)
  • So when you’re writing test you’re actually writing in DSL, which is in a nutshell bash script which calls golang binary which is written in Eden.

15

16 of 22

Escript: header

16

17 of 22

EScript: body

17

18 of 22

EScript: footer

18

19 of 22

EScript

19

Note you can write compilable golang test and execute it in escript

20 of 22

Golang: Apparmor test

20

21 of 22

Future of Eden

21

22 of 22

Thanks!

Pavel Abramov: 27.06.2024

22