Closed kayetter closed 2 years ago
Hi @kayetter - I think the issue here is that you are using node-cds-auth and the test.yaml for cdsify - but the integration test code for dataverse-ify.
I'd recommend using dataverse-ify rather that cdsify.
So you would ened to use the nodewebapi in your test.yaml, and use dataverse-auth
I've updated the docs which still had the old cdsify info which I suspect was the cause of confusion!
Thank you so much for the response! I was confused with node-cds-auth so I tried again with the dataverse-auth. While I did get an error it is a different error : "No token found for environment". See the screen shot below of my terminal and the successful token. And then the error when trying to run the integration test. Obviously I am missing some other configuration?
Hi @kayetter you might have got round this by now - but it seems the issue could just be as simple as there being a trailing / in your test.yaml file.
Instead of:
nodewebapi:
server:
host: https://org.api.crm3.dynamics.com
version: 9.1
Use:
nodewebapi:
server:
host: https://org.api.crm3.dynamics.com/
version: 9.1
I'll add an issue to make dataverse-ify more forgiving of this!
Tracked in #21
I can't seem to get my config.server configured. When I run "jest integration" in terminal I get the following error:
My configuration is as follows:
test.yaml file is present in a config folder directly under the root directory. Am I missing a step to configure credentials?
test.yaml contains the following configuration:
nodewebapi: logging: verbose server: host: https://[my environment].dynamics.com version: 9.1
however in the dataverse-ify integration instructions it says to use this:nodecds: server: host: https://someorg.crm11.dynamics.com version: 9.1
import { SetupGlobalContext } from "dataverse-ify/lib/webapi";
present in integration.AccountRibbon.test.tsserviceClient set to
const serviceClient = new XrmContextCdsServiceClient(Xrm.WebApi);
Ran npx node-cds-auth to get refreshToken
I tried updating the version in the test.yaml to 9.2. I also tried using a host = "https://[my environment].api.crm.dynamics.com"
Can you help me troubleshoot what I might be missing in my configuration?