Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Tests silently fail. #36

Open
jamescurran opened this issue Oct 23, 2020 · 2 comments
Open

Unit Tests silently fail. #36

jamescurran opened this issue Oct 23, 2020 · 2 comments

Comments

@jamescurran
Copy link

IF the connection string isn't set in the appsettings.json file for the unit tests (as is the case in the checked-in file), all the test will just return without doing anything or triggering an assert (appearing to pass).

The lines at AzureServiceBusQueueTests.cs(21)

        if (String.IsNullOrEmpty(connectionString))
            return null;

need to be changed to something like:

         Assert.False(String.IsNullOrEmpty(connectionString), "AzureServiceBusConnectionString must be specified in the appsettings.json file");
@niemyjski
Copy link
Member

niemyjski commented Oct 23, 2020

I believe the tests are getting an environment variable for the connection string that's encrypted. We wanted it so they don't fail if it's not specified but this could be argued it should fail with a message like this @ejsmith

@ejsmith
Copy link
Contributor

ejsmith commented Oct 23, 2020

There was a time where we didn't have resources to be able to run them on every commit. So we changed it to skip like this, but we should have just removed running tests from the build instead. I agree with making it assert @jamescurran. Can you commit a PR for that?

Is there a local emulator for servicebus that we can use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants