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

REFACTORING: Use DepResover mock in constroller tests #923

Closed
kuritka opened this issue Jul 20, 2022 · 3 comments
Closed

REFACTORING: Use DepResover mock in constroller tests #923

kuritka opened this issue Jul 20, 2022 · 3 comments
Milestone

Comments

@kuritka
Copy link
Collaborator

kuritka commented Jul 20, 2022

Use DepResover mock instead of settings := provideSettings(t, predefinedConfig) in constroller tests.

Using the settings object and calling reconcile is no longer sufficient. For example, the function works with k8gb.absa.oss_v1beta1_gslb_cr.yaml from which it generates a gslb for the tests. Any change to this file will
cause the test to crash. We now have a depressolver mock (and a number of other mocks) that we can use for testing.

@somaritane somaritane added this to k8gb Jul 25, 2022
@somaritane somaritane moved this to To do in k8gb Jul 25, 2022
kuritka added a commit that referenced this issue Sep 9, 2022
related to #923,#932

I'm going to introduce new powers for Manager and Client. I'm putting all mocks into one directory.

Signed-off-by: kuritka <kuritka@gmail.com>
kuritka added a commit that referenced this issue Sep 9, 2022
related to #923,#932

I'm going to introduce new mocks for Manager and Client. I'm putting all mocks into one directory.

Signed-off-by: kuritka <kuritka@gmail.com>
kuritka added a commit that referenced this issue Sep 12, 2022
related to #923,#932

I'm going to introduce new mocks for Manager and Client. I'm putting all mocks into one directory.

Signed-off-by: kuritka <kuritka@gmail.com>
@somaritane somaritane added this to the 1.0 milestone Oct 9, 2022
@somaritane
Copy link
Contributor

@kuritka what's the status of this one, can we close it?

@kuritka
Copy link
Collaborator Author

kuritka commented Oct 10, 2022

Hi, not fully. Depresolver mock for tests is ready (#951), but controller tests would be refactored, to use this mock instead of direct instanptiating. Coverage requirement is still met but it's more about unify controller tests with mocks.

@ytsarev
Copy link
Member

ytsarev commented Jul 20, 2024

Stale issue, feel free to reopen if needed

@ytsarev ytsarev closed this as completed Jul 20, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in k8gb Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants