Package: golang-github-mendersoftware-mender-artifact / 3.9.0+ds1-1

0001-Revert-cli-write_test-to-urfave-cli-1.22.5-compatibi.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Andreas Henriksson <andreas@fatal.se>
Date: Wed, 18 Aug 2021 10:16:31 +0200
Subject: Revert cli/write_test to urfave/cli < 1.22.5 compatibility

The following commit was included in urfave v1.22.5 release which
changed from short to long options:
https://github.com/urfave/cli/commit/ee2fae6dcecc3f768919d04688c2c92a37f8d1ab

Debian is still at urfave/cli 1.22.4, so revert the test to how it
used to look so it passes again until we get 1.22.5 in debian (at
which point this patch can simply be dropped).

(Alternatively mender-artifact might at some point be ported to
urfave-cli-v2, which would make the point moot and this patch no longer
needed.)
---
 cli/write_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cli/write_test.go b/cli/write_test.go
index d97d2b7..3524ad9 100644
--- a/cli/write_test.go
+++ b/cli/write_test.go
@@ -35,7 +35,7 @@ func TestArtifactsWrite(t *testing.T) {
 
 	err = Run([]string{"mender-artifact", "write", "rootfs-image"})
 	assert.Error(t, err)
-	assert.Contains(t, err.Error(), "Required flags \"artifact-name, device-type, file\" not set",
+	assert.Contains(t, err.Error(), "Required flags \" n,  t,  f\" not set",
 		"Required flags error missing")
 
 	updateTestDir, _ := ioutil.TempDir("", "update")