Skip to content

Commit 49ffa3c

Browse files
committed
Try to fix the help test, with case sensitive "refute" matching
1 parent 1dc7cd8 commit 49ffa3c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

solr/packaging/powershell-tests/Help.Tests.ps1

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,21 @@ Describe "Solr Help Command" {
6666
It "solr --help flag prints help" {
6767
$output = Test-HelpOutput @("--help") "Usage: solr COMMAND OPTIONS" "solr --help"
6868
$output | Should -Match "Usage: solr COMMAND OPTIONS"
69-
$output | Should -Not -Match "ERROR"
69+
$output | Should -Not -cmatch "ERROR"
7070
}
7171

7272
It "solr with no flags prints help" {
7373
$output = Test-HelpOutput @() "Usage: solr COMMAND OPTIONS" "solr (no flags)"
7474
$output | Should -Match "Usage: solr COMMAND OPTIONS"
75-
$output | Should -Not -Match "ERROR"
75+
$output | Should -Not -cmatch "ERROR"
7676
}
7777
}
7878

7979
Context "Command-specific help" {
8080
It "start --help flag prints help" {
8181
$output = Test-HelpOutput @("start", "--help") "Usage: solr start" "start --help"
8282
$output | Should -Match "Usage: solr start"
83-
$output | Should -Not -Match "ERROR"
83+
$output | Should -Not -cmatch "ERROR"
8484
}
8585

8686
It "start -h flag prints help" {
@@ -92,62 +92,62 @@ Describe "Solr Help Command" {
9292
It "stop --help flag prints help" {
9393
$output = Test-HelpOutput @("stop", "--help") "Usage: solr stop" "stop --help"
9494
$output | Should -Match "Usage: solr stop"
95-
$output | Should -Not -Match "ERROR"
95+
$output | Should -Not -cmatch "ERROR"
9696
}
9797

9898
It "restart --help flag prints help" {
9999
$output = Test-HelpOutput @("restart", "--help") "Usage: solr restart" "restart --help"
100100
$output | Should -Match "Usage: solr restart"
101-
$output | Should -Not -Match "ERROR"
101+
$output | Should -Not -cmatch "ERROR"
102102
}
103103

104104
It "status --help flag prints help" {
105105
$output = Test-HelpOutput @("status", "--help") "usage: bin/solr status" "status --help"
106106
$output | Should -Match "usage: bin/solr status"
107-
$output | Should -Not -Match "ERROR"
107+
$output | Should -Not -cmatch "ERROR"
108108
}
109109

110110
It "healthcheck --help flag prints help" {
111111
$output = Test-HelpOutput @("healthcheck", "--help") "usage: bin/solr healthcheck" "healthcheck --help"
112112
$output | Should -Match "usage: bin/solr healthcheck"
113-
$output | Should -Not -Match "ERROR"
113+
$output | Should -Not -cmatch "ERROR"
114114
}
115115

116116
It "create --help flag prints help" {
117117
$output = Test-HelpOutput @("create", "--help") "usage: bin/solr create" "create --help"
118118
$output | Should -Match "usage: bin/solr create"
119-
$output | Should -Not -Match "ERROR"
119+
$output | Should -Not -cmatch "ERROR"
120120
}
121121

122122
It "delete -h flag prints help" {
123123
$output = Test-HelpOutput @("delete", "-h") "usage: bin/solr delete" "delete -h"
124124
$output | Should -Match "usage: bin/solr delete"
125-
$output | Should -Not -Match "ERROR"
125+
$output | Should -Not -cmatch "ERROR"
126126
}
127127

128128
It "zk --help flag prints help" {
129129
$output = Test-HelpOutput @("zk", "--help") "usage:" "zk --help"
130130
$output | Should -Match "usage:"
131131
$output | Should -Match "bin/solr zk ls"
132-
$output | Should -Not -Match "ERROR"
132+
$output | Should -Not -cmatch "ERROR"
133133
}
134134

135135
It "auth --help flag prints help" {
136136
$output = Test-HelpOutput @("auth", "--help") "bin/solr auth enable" "auth --help"
137137
$output | Should -Match "bin/solr auth enable"
138-
$output | Should -Not -Match "ERROR"
138+
$output | Should -Not -cmatch "ERROR"
139139
}
140140

141141
It "assert --help flag prints help" {
142142
$output = Test-HelpOutput @("assert", "--help") "usage: bin/solr assert" "assert --help"
143143
$output | Should -Match "usage: bin/solr assert"
144-
$output | Should -Not -Match "ERROR"
144+
$output | Should -Not -cmatch "ERROR"
145145
}
146146

147147
It "post --help flag prints help" {
148148
$output = Test-HelpOutput @("post", "--help") "usage: bin/solr post" "post --help"
149149
$output | Should -Match "usage: bin/solr post"
150-
$output | Should -Not -Match "ERROR"
150+
$output | Should -Not -cmatch "ERROR"
151151
}
152152
}
153153
}

0 commit comments

Comments
 (0)