Skip to content
New issue

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

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

Already on GitHub? # to your account

Task: Make controller tests consistent #677

Closed
1 of 3 tasks
jananivMS opened this issue Feb 26, 2020 · 2 comments
Closed
1 of 3 tasks

Task: Make controller tests consistent #677

jananivMS opened this issue Feb 26, 2020 · 2 comments
Labels
test Test refactoring related tasks

Comments

@jananivMS
Copy link
Contributor

jananivMS commented Feb 26, 2020

Currently the tests aren't consistent in terms of the helpers they use to reduce redundant code, what the test etc. This task tracks making sure all the controller tests look consistent.

Also look at issue #528 (this should be fixed by using EnsureDelete)

**Done criteria **
This is the "done" criteria for this task

  • All tests that can use EnsureInstance() and EnsureDelete() helpers should use this (addressed in PR [Test cleanup] Cleanup suite_test and use Ensure functions #971)
  • All tests for controllers that write secrets should test that the secret exists after successful creation of the resource
  • Ensure tests do not ignore the errors from Get or Create Call. If this is ignored, we may get a value that is nil and cause panic references
@jananivMS jananivMS added task test Test refactoring related tasks labels Feb 26, 2020
@melonrush13
Copy link
Contributor

Need to use the EnsureInsurance and Delete Insurance functions in the controller tests instead of individual creates/etc.

Controller Tests using Ensure/Delete:

  • azuresqlserver_combined_test
  • eventhub
  • eventhub namespace
  • keyvault
  • rediscache
  • rg

To Do:
Implement in the rest

@matthchr
Copy link
Member

matthchr commented Feb 4, 2021

This has mostly been done

@matthchr matthchr closed this as completed Feb 4, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
test Test refactoring related tasks
Projects
None yet
Development

No branches or pull requests

3 participants