Azure / Azure/azure-functions-host

IntegrationTests in Azure functions projects

Open
#4,127 6 comments 0 reactions 0 assignees View on GitHub
area: engineering
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Hi folks,

I've created an integration test project in order to test my azure functions. I'm using Microsoft.Azure.WebJobs.Script.WebHost package with version 2.0.12303. When I try to run my tests I've received this annoying error:

![image](https://user-images.githubusercontent.com/1729519/53229504-a4cd1f00-3684-11e9-980c-54c836c37877.png)

As you can see in the error it's related with the workers folder that doesn't exists when you install this NuGet package:

C:\Users\lruiz\.nuget\packages\microsoft.azure.webjobs.script\2.0.12303\lib\netstandard2.0

![image](https://user-images.githubusercontent.com/1729519/53229550-d0500980-3684-11e9-83b5-5512c7541bb5.png)

If I create this folder my tests passed:

![image](https://user-images.githubusercontent.com/1729519/53229574-e8278d80-3684-11e9-9f08-c25f57fc27b1.png)

![image](https://user-images.githubusercontent.com/1729519/53230747-a3e9bc80-3687-11e9-8038-334c5891b897.png)

I think is related with this line of code:

https://github.com/Azure/azure-functions-host/blob/acca4b6f6a800218876c4c7692189268ca161987/src/WebJobs.Script/Rpc/Configuration/WorkerConfigFactory.cs#L91

One thing is to check if this folder exists and not enumerate workers directory but I don't know if there are some side effects if this folder doesn't exist. It's very annoying because if another developer pulls the solution and try to run the tests will fails and I have to think if I have to create this folder manually or add some bootstrap to my tests that will make them tightly couple to this path, that's definitively is not a good solution in my opinion.

Regards!

Contributor guide

Open the contributing guide

Research direction

Start with WorkerConfigFactory.cs at the linked line and reproduce the failure from an integration test project using Microsoft.Azure.WebJobs.Script.WebHost 2.0.12303. Check how the missing workers folder is enumerated and whether the host handles its absence; done means the tests run for a freshly pulled solution without manually creating that folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.