app-admin/hcloud: enable simple test
authorAgostino Sarubbo <ago@gentoo.org>
Fri, 1 May 2020 12:17:39 +0000 (14:17 +0200)
committerAgostino Sarubbo <ago@gentoo.org>
Fri, 1 May 2020 12:17:39 +0000 (14:17 +0200)
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Agostino Sarubbo <ago@gentoo.org>
app-admin/hcloud/hcloud-1.16.2.ebuild

index f5620e0f972fac9ccf428345eaf86832aecdb5b9..4748be94a8425294e754fd066a4ccaa2bc55f91b 100644 (file)
@@ -19,6 +19,15 @@ src_compile() {
        go build -mod vendor -o ${PN} -ldflags "-w -X github.com/hetznercloud/cli/cli.Version=${PV}-gentoo" ./cmd/${PN} || die "build failed"
 }
 
+src_test() {
+       # For upstream a simple test is run 'hcloud version'
+       ./hcloud version
+       if [[ $? -ne 0 ]]
+       then
+               die "Test failed"
+       fi
+}
+
 src_install() {
        dobin ${PN}
 }