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

Split out Test_NewResources into smaller tests #252

Closed
dibyom opened this issue Dec 6, 2019 · 0 comments · Fixed by #321
Closed

Split out Test_NewResources into smaller tests #252

dibyom opened this issue Dec 6, 2019 · 0 comments · Fixed by #321
Assignees
Labels
area/testing Issues or PRs related to testing

Comments

@dibyom
Copy link
Member

dibyom commented Dec 6, 2019

template/event_test.go contains a Test_NewResources function that tests both ResolveParams and ResolveResources. So, there is quite a bit of setup required to test each function.

We should separate it out into smaller tests that test each of those two exported functions separately

@dibyom dibyom added the area/testing Issues or PRs related to testing label Dec 6, 2019
@dibyom dibyom self-assigned this Dec 6, 2019
dibyom added a commit to dibyom/triggers that referenced this issue Jan 7, 2020
We used to have a function called NewResources that we later split into
smaller functions -- ResolveParams and ResolveResources. However, in our
unit tests, we kept the Test_NewResources function leading to tests that
were more verbose/needed more setup than necessary. This commit splits
the tests into smaller more targeted tests.

Fixes tektoncd#252

Signed-off-by: Dibyo Mukherjee <[email protected]>
dibyom added a commit to dibyom/triggers that referenced this issue Jan 7, 2020
We used to have a function called NewResources that we later split into
smaller functions -- ResolveParams and ResolveResources. However, in our
unit tests, we kept the Test_NewResources function leading to tests that
were more verbose/needed more setup than necessary. This commit splits
the tests into smaller more targeted tests.

Fixes tektoncd#252

Signed-off-by: Dibyo Mukherjee <[email protected]>
dibyom added a commit to dibyom/triggers that referenced this issue Jan 7, 2020
We used to have a function called NewResources that we later split into
smaller functions -- ResolveParams and ResolveResources. However, in our
unit tests, we kept the Test_NewResources function leading to tests that
were more verbose/needed more setup than necessary. This commit splits
the tests into smaller more targeted tests.

Fixes tektoncd#252

Signed-off-by: Dibyo Mukherjee <[email protected]>
tekton-robot pushed a commit that referenced this issue Jan 8, 2020
We used to have a function called NewResources that we later split into
smaller functions -- ResolveParams and ResolveResources. However, in our
unit tests, we kept the Test_NewResources function leading to tests that
were more verbose/needed more setup than necessary. This commit splits
the tests into smaller more targeted tests.

Fixes #252

Signed-off-by: Dibyo Mukherjee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant