Improve error message when func describe is run outside function directory#3027
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. DetailsInstructions 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 59.39% 60.19% +0.79%
==========================================
Files 134 134
Lines 13500 13517 +17
==========================================
+ Hits 8018 8136 +118
+ Misses 4539 4409 -130
- Partials 943 972 +29
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:
|
lkingland
left a comment
There was a problem hiding this comment.
/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")
}
} |
lkingland
left a comment
There was a problem hiding this comment.
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 ! |
|
/retest |
b0f7bf6 to
3901142
Compare
Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
3901142 to
27ab161
Compare
|
/retest |
|
Hey @gauron99 it's ready now ! |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gauron99, lkingland, RayyanSeliya The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
func describeis run outside a function directory./kind enhancement
Fixes #3026
Release Note