import { CogniteWellsClient } from "src"; import { Source } from "src/model/source"; import { setupLoggedInIngestionClient } from "../../testUtils"; let client: CogniteWellsClient; beforeAll(async () => { client = await setupLoggedInIngestionClient(); }); test("ingest source", async () => { expect(client).not.toBe(undefined); const expected: Source = { name: "VOLVE", description: "What a cool source!", }; const sources = await client.sources.ingest([expected]); const actual = sources.items[0]; expect(actual.name).toBe(expected.name); expect(actual.description).toBe(expected.description); }); test("delete source", async () => { const source: Source = { name: "my-new-source" }; await client.sources.ingest([source]); const sourceNames = (await client.sources.list()).items.map((it) => it.name); await client.wells.mergeRules.set(sourceNames); await client.sources.delete({ items: [source] }); });