Skip to content

Commit

Permalink
[Event annotations] add more API integration tests (#166463)
Browse files Browse the repository at this point in the history
## Summary

Covers the event annotations API in tests.

Part of #159053
Part of #161038

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
drewdaemon and kibanamachine authored Sep 18, 2023
1 parent 2a4cb33 commit 6d47334
Show file tree
Hide file tree
Showing 7 changed files with 435 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ const getResultSchema = schema.object(
);

const createOptionsSchema = schema.object({
overwrite: schema.maybe(schema.boolean()),
references: schema.maybe(referencesSchema),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ export type EventAnnotationGroupGetOut = GetResult<
// ----------- CREATE --------------

export interface CreateOptions {
/** If a document with the given `id` already exists, overwrite it's contents (default=false). */
overwrite?: boolean;
/** Array of referenced saved objects. */
references?: Reference[];
}
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/event_annotation/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ export type { FetchEventAnnotationsArgs } from './fetch_event_annotations/types'
export type { EventAnnotationArgs, EventAnnotationOutput } from './types';

export type {
EventAnnotationGroupGetIn,
EventAnnotationGroupGetOut,
EventAnnotationGroupSavedObjectAttributes,
EventAnnotationGroupCreateIn,
EventAnnotationGroupCreateOut,
EventAnnotationGroupUpdateIn,
EventAnnotationGroupSearchIn,
EventAnnotationGroupSearchOut,
EventAnnotationGroupDeleteIn,
EventAnnotationGroupDeleteOut,
} from './content_management';
export { CONTENT_ID } from './content_management';
export { ANNOTATIONS_LISTING_VIEW_ID } from './constants';
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export class EventAnnotationGroupStorage
const transforms = getTransforms(cmServicesDefinition, requestVersion);
const soClient = await savedObjectClientFromRequest(ctx);

// Save data in DB
const {
saved_object: savedObject,
alias_purpose: aliasPurpose,
Expand Down
Loading

0 comments on commit 6d47334

Please sign in to comment.