test: introduce local integration testing #902
Open
devydave
wants to merge 17 commits from
local-integration-testing into main
pull from: local-integration-testing
merge into: :main
:main
:renovate/golang-1.27
:renovate/otel-weaver-0.x
:renovate/github.com-charmbracelet-bubbletea-2.x
:renovate/github.com-charmbracelet-log-2.x
:renovate/github.com-charmbracelet-lipgloss-2.x
:renovate/codespell-2.x
:local-integration-testing
:fix/492
:renovate/tonistiigi-xx-1.x
:renovate/alpine-3.x
:chore-deps
:fix/deps
:fix/613
Labels
Clear labels
bug
build
ci/cd
critical fix
design
documentation
duplicate
easy-first-issue
enhancement
help wanted
i10n
i18n
installer
invalid
question
release
release-candidate
security
tech-debt
test
wontfix
Something is not working
go build related issues
Building things with CI/CD
https://docs.coopcloud.tech/federation/resolutions/passed/010/
UI/UX
Documenting all the things
This issue or pull request already exists
Something for new people to get stuck into. We hope it's easy!
New feature
Need some help
Everything to do with localisation
Everything to do with internationalisation
Everything to do with the install script.
Something is wrong
More information is needed
Release management
Related to the new release candidate
Security related
Unit/integration testing
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/abra#902
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR adds a declarative integration testing setup which includes 2 local VMs client and server which can be started and stopped via a command. The VMs are run with QEMU and created by https://github.com/microvm-nix/microvm.nix
The key pair is generated for this use case and is safe to commit, it resolves the problem that the readFile function can only be used with git tracked files.
@@ -0,0 +35,4 @@tag = "repo";# Source path can be absolute or relative# to /var/lib/microvms/$hostNamesource = "/home/dev/Documents/kum/abra";this needs to be adjusted, I could change it to an env variable, but this requires to run the nix command with --impure. Another idea would be to read the path from a file, that needs to be created by the user or script at startup.
WIP: feat: introduce local integration testingto test: introduce local integration testingThe PR is now ready to review, I will add another script file that automates the startup of the VMs and testing.
One thing I am not sure about is where to put the helper functions that are currently in the Makefile. They are not all needed for startup but nice to have, ideas welcome :)
And I will add a PR to the docs for the host setup of microvm.
tests/resources/path_to_repo is modified after running the script
ssh key has 0644 but should be 0600
running only one file or one file + one test would be good
Just ran the new ./test_integration.sh and its freaking amazing!!!!!!
@devydave I would say, move the script and make file commands into an nix directory inside the test directory until it is proven, that it is working outside of nixos and the just merge this
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.