Using containers for unit testing of bash functions

Intro Unit testing of Bash functions involves the process of systematically verifying the correctness and reliability of individual functions within a Bash script. While Bash is primarily used for scripting and automation, it’s important to ensure that the functions within your scripts work as expected, especially as scripts become more complex. Unit testing in Bash can help catch bugs and prevent unexpected behavior. Fixing bugs Working on a bugfix for an internal shell script, I wanted to add some unit tests to ensure correctness. After a quick search, I found this single-file “framework” (thanks, Ryan) that provides xUnit-style assertions. So we can use it as a starting point. ...

August 17, 2023 · Andrea Manzini

compare package version across distros

TLDR: This script now answers the question “Do some of my openSUSE packages have newer versions in other distros?” As a following on previous post, I added an useful feature in order to have more information about a package. Since I maintain some openSUSE packages, I want to be informed if they gets outdated and if other packagers have released newer versions. ...

January 9, 2023 · Andrea Manzini

get update info about packages

being lazy, I made a small utility to check last pkgs update date on Open Build Service. You can find the project repository on my github, but it’s so simple I can paste also here. The usage is pretty simple: just run the command giving it a package name, and then it will tell you when it was last updated. With this information, you can decide/check if the package needs some work on! ...

November 24, 2022 · Andrea Manzini

get notifications about openQA job status

I got bored of ‘waiting’ for an OpenQA openSUSE job to complete, so I wrote this quick and dirty script… For the same purpose there’s also the excellent and full-fledged openqa-mon, but I took the chance to learn something by implementing a simpler version myself. ...

October 5, 2022 · Andrea Manzini