// Copyright 2020 Cognite AS import { createWellsClient } from "../client/clientCreateUtils"; import CogniteWellsClient from "../client/cogniteWellsClient"; export async function setupLoggedInClient(): Promise { try { const client = createWellsClient( "WELLS TEST CLIENT", "http://localhost:8080" ); client.loginWithApiKey({ project: "subsurface-test", apiKey: "test", }); await client.wells.mergeRules.set(["VOLVE", "EDM", "test_source"]); await client.wellbores.mergeRules.set(["VOLVE", "EDM", "test_source"]); return client; } catch (err) { console.error("Failed to initialize CogniteClient: ", err); throw err; } } export async function setupLoggedInIngestionClient(): Promise { const client = createWellsClient( "WELLS INGESTION TEST CLIENT", "http://localhost:8080" ); client.loginWithApiKey({ project: "owa-test", apiKey: "test", }); await client.wells.mergeRules.set(["Petrel"]); await client.wellbores.mergeRules.set(["Petrel"]); return client; } export const authTokens = { accessToken: "abc", };