@@ -51,6 +51,29 @@ const execute = (operation: OciLoggingOperation, input: unknown, signal?: AbortS
5151describe ( 'OCI Logging provider operations' , ( ) => {
5252 beforeEach ( ( ) => vi . clearAllMocks ( ) )
5353
54+ it . each ( [ undefined , null , 'Synthetic group' ] ) (
55+ 'accepts optional log-group descriptions in lists and details: %s' ,
56+ async ( description ) => {
57+ const wireGroup = { ...group , description }
58+ const expectedGroup = {
59+ ...group ,
60+ ...( description === undefined ? { } : { description : description ?? undefined } ) ,
61+ }
62+ respond ( [ wireGroup ] )
63+ expect ( await execute ( 'list_log_groups' , { compartmentId : 'compartment' } ) ) . toMatchObject ( {
64+ logGroups : [ expectedGroup ] ,
65+ } )
66+ respond ( wireGroup )
67+ expect ( await execute ( 'get_log_group' , { logGroupId : 'group' } ) ) . toMatchObject ( {
68+ logGroup : expectedGroup ,
69+ } )
70+ respond ( { ...group , description : 42 } )
71+ await expect ( execute ( 'get_log_group' , { logGroupId : 'group' } ) ) . rejects . toBeInstanceOf (
72+ OciLoggingResponseError
73+ )
74+ }
75+ )
76+
5477 it ( 'accepts absent custom-log configuration and system tags in lists and details' , async ( ) => {
5578 const wireLog = { ...log , configuration : null , systemTags : null }
5679 respond ( [ wireLog ] )
0 commit comments