Skip to content

Commit 2fcf13e

Browse files
committed
test: test for stdout string
1 parent 28afd00 commit 2fcf13e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

t/02_daemon_linux_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ func TestErrorBetweenSavingAndSigning(t *testing.T) {
5656
runCmd(t, &cmd{
5757
Cmd: "make",
5858
Args: []string{"testca"},
59-
ErrLike: []string{"certificate request ok"},
59+
Like: []string{"certificate request ok"},
60+
ErrLike: []string{".*"},
6061
})
6162
defer runCmd(t, &cmd{
6263
Cmd: "make",
@@ -78,7 +79,12 @@ func TestErrorBetweenSavingAndSigning(t *testing.T) {
7879
runCmd(t, &cmd{
7980
Cmd: "openssl",
8081
Args: []string{"x509", "-req", "-in=test.csr", "-CA=dist/cacert.pem", "-CAkey=dist/ca.key", "-out=server.crt", "-days=365"},
81-
ErrLike: []string{"Certificate request self-signature ok"},
82+
ErrLike: []string{".*"},
83+
})
84+
runCmd(t, &cmd{
85+
Cmd: "openssl",
86+
Args: []string{"x509", "-req", "-in=test.csr", "-CA=dist/cacert.pem", "-CAkey=dist/ca.key", "-noout", "-subject"},
87+
ErrLike: []string{".*"},
8288
})
8389
defer os.Remove("server.crt")
8490

0 commit comments

Comments
 (0)