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

Test that trigger is not ready before dependency exists with dependency annotation #7896

Open
Cali0707 opened this issue May 6, 2024 · 7 comments · May be fixed by #7946
Open

Test that trigger is not ready before dependency exists with dependency annotation #7896

Cali0707 opened this issue May 6, 2024 · 7 comments · May be fixed by #7946
Assignees
Labels
area/test-and-release Test infrastructure, tests or release good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature-request

Comments

@Cali0707
Copy link
Member

Cali0707 commented May 6, 2024

Problem
Currently in the rekt test TestTriggerDependencyAnnotation, we do not verify that the trigger is not ready until the PingSource exists. A simple way to fix this would be to move the trigger.IsReady(...) call from the Setup phase to the Requirement phase, and then add a new step function to the Setup phase which checks that the trigger is not ready with reason DependencyDoesNotExist.

Persona:
Which persona is this feature for?

Exit Criteria
The rekt test verifies that the trigger is not ready with reason DependencyDoesNotExist before the PingSource is installed.

Time Estimate (optional):
How many developer-days do you think this may take to resolve? 1

Additional context (optional)

@Cali0707
Copy link
Member Author

Cali0707 commented May 6, 2024

/area test-and-release
/good-first-issue

Copy link

knative-prow bot commented May 6, 2024

@Cali0707:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/area test-and-release
/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow knative-prow bot added area/test-and-release Test infrastructure, tests or release good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels May 6, 2024
@Rahul-Kumar-prog
Copy link
Contributor

/assign

@Rahul-Kumar-prog
Copy link
Contributor

@Cali0707 we have to change all the trigger.IsReady(...) setup phase to requirement phase?

@Cali0707
Copy link
Member Author

Cali0707 commented May 9, 2024

hey @Rahul-Kumar-prog , you only need to move the trigger.IsReady(..) to the requirement phase for the specific test feature that I linked above. All other tests should be left unchanged.

You will also need to add the step function I was mentioning above that verifies that the trigger is not ready with reason DependencyDoesNotExist to the setup phase for the test I linked above

@Rahul-Kumar-prog
Copy link
Contributor

Rahul-Kumar-prog commented May 11, 2024

@Cali0707
here DependencyDoesNotExist, is it a function or string.
because in setup phase it only takes a string and a featur.Stepfn? can you tell me about this?

And when I write trigger.---- there no any dependencydoesnotexist.
If so should I handle it with err?

@Cali0707
Copy link
Member Author

because in setup phase it only takes a string and a featur.Stepfn? can you tell me about this?

I'd recommend reading the documentation in https://github.com/knative-extensions/reconciler-test/ which I linked above, this explains how the e2e tests and phases work

here DependencyDoesNotExist, is it a function or string.
You will need to create a function which checks for this status reason (which will be a string). This is where the StepFn comes in

@Rahul-Kumar-prog Rahul-Kumar-prog linked a pull request May 28, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release Test infrastructure, tests or release good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature-request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants