-
Notifications
You must be signed in to change notification settings - Fork 164
Improve error message when func describe is run outside function directory
#3027
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi @RayyanSeliya. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3027 +/- ##
==========================================
+ Coverage 55.66% 59.21% +3.54%
==========================================
Files 134 134
Lines 17315 17338 +23
==========================================
+ Hits 9638 10266 +628
+ Misses 6773 6108 -665
- Partials 904 964 +60
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Thanks for the improved error message.
9bfc688 to
c6304bf
Compare
|
This one is failing on // TestDescribe_Default ensures that running describe when there is no
// function in the given directory fails correctly.
func TestDescribe_Default(t *testing.T) {
_ = FromTempDirectory(t)
describer := mock.NewDescriber()
cmd := NewDescribeCmd(NewTestClient(fn.WithDescriber(describer)))
cmd.SetArgs([]string{})
err := cmd.Execute()
if err == nil {
t.Fatal("describing a nonexistent function should error")
}
if !strings.Contains(err.Error(), "function not found at this path and no name provided") {
t.Fatalf("Unexpected error text returned: %v", err)
}
if describer.DescribeInvoked {
t.Fatal("Describer incorrectly invoked")
}
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to update the test which spot-checks this output I believe.
c6304bf to
b0f7bf6
Compare
|
hey @lkingland dont know why the test are failing i think its an infrastructure /network issue i have updated the test to check our new description ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lkingland, RayyanSeliya The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
Signed-off-by: RayyanSeliya <[email protected]>
Signed-off-by: RayyanSeliya <[email protected]>
Signed-off-by: RayyanSeliya <[email protected]>
Signed-off-by: RayyanSeliya <[email protected]>
b0f7bf6 to
3901142
Compare
|
New changes are detected. LGTM label has been removed. |
Changes
func describeis run outside a function directory./kind enhancement
Fixes #3026
Release Note