Skip to content

Commit 36d8e25

Browse files
committed
adjust test regex to removed +
1 parent 722d7ab commit 36d8e25

5 files changed

+9
-9
lines changed

pkg/snclient/check_snclient_version_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ func TestCheckSNClientVersion(t *testing.T) {
1111
res := snc.RunCheck("check_snclient_version", []string{})
1212
assert.Equalf(t, CheckExitOK, res.State, "state OK")
1313
assert.Regexpf(t,
14-
`^SNClient\+ v\d+`,
14+
`^SNClient v\d+`,
1515
string(res.BuildPluginOutput()),
1616
"output matches",
1717
)
1818

1919
res = snc.RunCheck("check_nscp_version", []string{})
2020
assert.Equalf(t, CheckExitOK, res.State, "state OK")
2121
assert.Regexpf(t,
22-
`^SNClient\+ v\d+`,
22+
`^SNClient v\d+`,
2323
string(res.BuildPluginOutput()),
2424
"output matches",
2525
)

t/01_cmd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestCommandFlags(t *testing.T) {
2929
runCmd(t, &cmd{
3030
Cmd: bin,
3131
Args: []string{"run", "check_snclient_version"},
32-
Like: []string{`SNClient\+ v`},
32+
Like: []string{`SNClient v`},
3333
})
3434

3535
runCmd(t, &cmd{

t/40_e2e_deb_linux_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func TestDEBinstaller(t *testing.T) {
5151
runCmd(t, &cmd{
5252
Cmd: "/usr/bin/snclient",
5353
Args: []string{"-V"},
54-
Like: []string{`^SNClient\+ v`},
54+
Like: []string{`^SNClient v`},
5555
})
5656

5757
runCmd(t, &cmd{
@@ -83,7 +83,7 @@ func TestDEBinstaller(t *testing.T) {
8383
runCmd(t, &cmd{
8484
Cmd: bin,
8585
Args: []string{"run", "check_nsc_web", "-k", "-p", "test", "-u", "https://localhost:8443", "check_snclient_version"},
86-
Like: []string{`^SNClient\+ v`},
86+
Like: []string{`^SNClient v`},
8787
})
8888

8989
runCmd(t, &cmd{

t/41_e2e_build_msi_windows_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func TestMSIinstaller(t *testing.T) {
8989
runCmd(t, &cmd{
9090
Cmd: bin,
9191
Args: []string{"run", "check_nsc_web", "-k", "-p", "test", "-u", "https://localhost:8443", "check_snclient_version"},
92-
Like: []string{`^SNClient\+ v`},
92+
Like: []string{`^SNClient v`},
9393
})
9494

9595
// build second msi file (from the parent folder) to test upgrade
@@ -125,7 +125,7 @@ func TestMSIinstaller(t *testing.T) {
125125
runCmd(t, &cmd{
126126
Cmd: bin,
127127
Args: []string{"run", "check_nsc_web", "-k", "-p", "test", "-u", "https://localhost:8443", "check_snclient_version"},
128-
Like: []string{`^SNClient\+ v`},
128+
Like: []string{`^SNClient v`},
129129
})
130130
runCmd(t, &cmd{
131131
Cmd: bin,

t/42_e2e_pkg_osx_darwin_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestOSXinstaller(t *testing.T) {
6161
runCmd(t, &cmd{
6262
Cmd: "/usr/local/bin/snclient",
6363
Args: []string{"-V"},
64-
Like: []string{`^SNClient\+ v`},
64+
Like: []string{`^SNClient v`},
6565
})
6666

6767
// restart
@@ -80,7 +80,7 @@ func TestOSXinstaller(t *testing.T) {
8080
runCmd(t, &cmd{
8181
Cmd: bin,
8282
Args: []string{"run", "check_nsc_web", "-k", "-p", "test", "-u", "https://localhost:8443", "check_snclient_version"},
83-
Like: []string{`^SNClient\+ v`},
83+
Like: []string{`^SNClient v`},
8484
})
8585

8686
runCmd(t, &cmd{

0 commit comments

Comments
 (0)