0

I am trying to create some API tests for Azure Functions Apps. For the API to work properly it needs an azure storage account. I create a docker-compose file with

  • my API
  • Azurite
  • my API Tests

Everything works pretty smooth, until the API tries to access the storage. Then the storage returns 403 for my check if a file exists.

I created a script on my local system (not inside docker) that does exactly the same thing with exactly the same connection string and the same version of @azure/storage-blob (12.12.0)

"From the outside" my script works, but "from the inside" (docker-networks) it doesn't even though I can see the request being processed by azurite (it logs the incoming request)

I already tried using the name of the container, assigning a domainname (azurite.com) and using the internal and external ip of the system running the docker, but it all fails.

Can anybody offer any advice?

Woozar
  • 1,000
  • 2
  • 11
  • 35

1 Answers1

0

While writing this question, i did some more debugging to create a sample that was as easy as possible and I realised, that my calls only failed, while they were wrapped in

  import { startOperation, wrapWithCorrelationContext } from 'applicationinsights';

  const correlationContext = startOperation(...);
  wrapWithCorrelationContext(async () => {
    // this is where we do our business logic
  }, correlationContext)();

By turning off the app insights tracking, i fixed my issue with the connection to the azurite. Maybe this will help someone in a similar situation...

Woozar
  • 1,000
  • 2
  • 11
  • 35