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

Unit / integration tests #176

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

HackingM
Copy link
Contributor

Hi Erik,

I hope you are fully recovered.

I have finally found some time to get some basic unit / integration tests written for Kubler. As you can see this turned into a bit more of a project than I had intended...

The first five commits below add basic shellcheck and testing functionality which will be run on every commit. If the tests pass the live ebuild will be automatically updated in the repo if necessary. When a new release is made the current live ebuild will be used as a template, best possible keywords will be calculated and repoman used to check validity - a pull request will then be created against the target repo. The final action (maintain) keeps the keywords variable optimal on a schedule.

The actions listed are mostly from my hacking-gentoo repository apart from shellcheck which is from my hacking-actions repository. They have all been fairly thoroughly tested in my other repos. To use these actions you will need to make some minor modifications when importing them, mainly changing the target repository name for commits. You will also need to create a deploy key-pair and API access-token and configure them as secrets - see the instructions in the readme files for the action in question.

The next five commits are some basic tests and some minor shellcheck fixes - the shellcheck action found some more shell files!

The final commit modifies the dep-graph command to be capable of handling circular dependencies (without crashing) and correctly rendering them (with tests).

I have more in my repository but am having trouble with the final few features (unit testing of built images, test dependencies, etc). Can you try and rebuild the arg-bash parsing (using argbash-refresh.sh) as when I have tried the code it generates is very different to the current tree (even using argbash-2.3.0). I need to add a --pretend option so I can check that the build command correctly detects circular parent / test dependencies and that it builds things in the correct order. Thanks!

Feel free to cherry-pick things if you only like some of them.

@edannenberg
Copy link
Owner

Hi Max,

wow, very nice! I'm still on the road to recovery but gonna have a deeper look at this asap. Thanks!

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.

None yet

2 participants