@@ -56,10 +56,14 @@ var _ = Describe("ORAS beginners:", func() {
56
56
gomega .Expect (out ).Should (gbytes .Say ("--distribution-spec string\\ s+%s" , regexp .QuoteMeta (feature .Preview .Mark )))
57
57
})
58
58
59
- It ("should show text as default format type in help doc" , func () {
59
+ It ("should show tree as default format type in help doc" , func () {
60
60
MatchDefaultFlagValue ("format" , "tree" , "discover" )
61
61
})
62
62
63
+ It ("should show deprecation message when using table format" , func () {
64
+ ORAS ("discover" , RegistryRef (ZOTHost , ImageRepo , foobar .Tag ), "--format" , "table" ).MatchErrKeyWords (feature .DeprecationMessageTableFormat ).Exec ()
65
+ })
66
+
63
67
It ("should fail when no subject reference provided" , func () {
64
68
ORAS ("discover" ).ExpectFailure ().MatchErrKeyWords ("Error:" ).Exec ()
65
69
})
@@ -192,7 +196,7 @@ var _ = Describe("1.1 registry users:", func() {
192
196
})
193
197
When ("running discover command with table output" , func () {
194
198
format := "table"
195
- It ("should all referrers of a subject with deprecation hint" , func () {
199
+ It ("should show all referrers of a subject with deprecation hint" , func () {
196
200
referrers := []ocispec.Descriptor {foobar .SBOMImageReferrer , foobar .SBOMImageReferrer }
197
201
ORAS ("discover" , subjectRef , "-o" , format ).
198
202
MatchErrKeyWords (feature .Deprecated .Mark ).
@@ -204,7 +208,7 @@ var _ = Describe("1.1 registry users:", func() {
204
208
err := ORAS ("discover" , subjectRef , "--format" , format ).
205
209
MatchKeyWords (append (discoverKeyWords (false , referrers ... ), foobar .Digest )... ).
206
210
Exec ().Err
207
- Expect (err ).NotTo (gbytes .Say (feature .Deprecated .Mark ))
211
+ Expect (err ).To (gbytes .Say (feature .Deprecated .Mark ))
208
212
})
209
213
})
210
214
When ("running discover command with go-template output" , func () {
0 commit comments