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

Fix Cosmos DB tests #1616

Merged
merged 1 commit into from
Apr 3, 2019
Merged

Fix Cosmos DB tests #1616

merged 1 commit into from
Apr 3, 2019

Conversation

munozemilio
Copy link
Member

WriteAsync and ReadAsync CosmosDbStorage.cs implementations throw ArgumentNullException when passing null as object to store or keys to look for.
Test were broken since both were asserting a different behavior.

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 52984

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 75.985%

Totals Coverage Status
Change from base Build 52909: 0.0%
Covered Lines: 4338
Relevant Lines: 5709

💛 - Coveralls

@cleemullins
Copy link
Contributor

No issues found in Microsoft.Bot.Builder.dll
No issues found in Microsoft.Bot.Builder.AI.Luis.dll
No issues found in Microsoft.Bot.Builder.AI.QnA.dll
No issues found in Microsoft.Bot.Builder.ApplicationInsights.dll
No issues found in Microsoft.Bot.Builder.Azure.dll
No issues found in Microsoft.Bot.Builder.Dialogs.dll
No issues found in Microsoft.Bot.Builder.TemplateManager.dll
No issues found in Microsoft.Bot.Configuration.dll
Compat issues with assembly Microsoft.Bot.Connector:
MembersMustExist : Member 'System.String Microsoft.Bot.Connector.Authentication.AuthenticationConstants.ToChannelFromBotLoginUrl' does not exist in the implementation but it does exist in the contract.

No issues found in Microsoft.Bot.Schema.dll

Copy link
Contributor

@cleemullins cleemullins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So...

Based on the tests, it's clear the behavior of the library has changed. The old behavior - which is more permissive and easier to deal with - seems the preferred behavior.

Rather than changing the tests to match the new behavior, can we update the code to make the old tests pass?

My thinking is that the expected behavior is that if I write "nothing" it should just work and not make me deal with Exeptions.

Same goes for "Read null", it should just return an empty set.

... both cases make my code easier to write and deal with.

@munozemilio
Copy link
Member Author

munozemilio commented Apr 3, 2019

Hi @cleemullins , that means revert @johnataylor commit, is that OK?

@cleemullins cleemullins merged commit a806512 into master Apr 3, 2019
@cleemullins cleemullins deleted the emimunoz/fix-cosmos-tests branch April 3, 2019 17:03
@cleemullins
Copy link
Contributor

Spoke with @johnataylor . He convinced me. Merging.

munozemilio added a commit that referenced this pull request Apr 3, 2019
cleemullins pushed a commit that referenced this pull request Apr 9, 2019
* Fix Namespace issue in Microsoft.Bot.Connector.Tests

* Fix Cosmos DB tests (#1616)

* Removed unused libraries

* Moving classes to correct namespace
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

Successfully merging this pull request may close these issues.

None yet

4 participants