I am following this page for creating a custom Checkbox application for Ubuntu Core testing:
I also found this forum post, but the advice in it didn’t solve my problem:
My versions:
snapcraft 7.3.1
autoconf 2.71
The error I’m getting is:
Failed to load plugin: unknown plugin: 'checkbox-provider’
The other post mentions that “Snapcraft 4.x has deprecated the way we designed the checkbox provider plugin.” Is that still the case, and are there new workarounds to get a base case working?
Also, ./cleanup.sh doesn’t exist anymore, so I’m guessing the commands in the docs just need a little updating.
Hi mckeesh,
I was able to follow the tutorial with a slightly modified procedure. For it you need as a prerequisite to install lxd (snap install lxd) and configure it (lxd init) for building the snap with snapcraft.
edit ~/checkbox/checkbox-snap/series_uc22/version.txt
type a version number (e.g. 0.1)
Add the .pxu file
edit ~/checkbox/checkbox-snap/series_uc22/checkbox-provider-myproject/units/my-first-test-plan.pxu
id: my-first-job
_summary: Is 10GB available in $HOME
_description:
this test checks if there's at least 10gb of free space in user's home
Directory
plugin: shell
estimated_duration: 0.01
command: [ `df -B 1G --output=avail $HOME |tail -n1` -gt 10 ]
unit: test plan
id: my-first-test-plan
_name: my first test plan
_description:
This is my first test plan
include:
my-first-job
Build the snap
cd ~/checkbox/checkbox-snap/series_uc22/
snapcraft --destructive-mode
exit
Of course, in case you need a difference base (e.g. 20) you need create a 20.04 container instead, to replace “base=22” with “base=20” and “series_uc22” with “series_uc20”. You’d need also to install checkbox20 snap instead of checkbox22.