-
Notifications
You must be signed in to change notification settings - Fork 1k
test harness should be able to expect errors #319
Changes from all commits
7630a71
7c20d78
48f87f5
fb288d7
d85ee3e
2dfeafd
4563aa9
aa5f279
09a5179
5def0c2
7f0ba82
d8de93b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"commands": [ | ||
["init"], | ||
["ensure", "-update", "github.com/sdboyer/deptest"] | ||
], | ||
"vendor-final": [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"commands": [ | ||
["init"], | ||
["ensure", "-n", "-update", "github.com/sdboyer/deptest"] | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"commands": [ | ||
["init"] | ||
], | ||
"error-expected" : "manifest file already exists" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -506,12 +506,7 @@ func (h *Helper) Path(name string) string { | |
joined = filepath.Join(h.tempdir, name) | ||
} | ||
|
||
// Ensure it's the absolute, symlink-less path we're returning | ||
abs, err := filepath.EvalSymlinks(joined) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure this is the best idea, as other tests with potentially different assumptions rely on it. If we really need to drop this for the harness' purposes, then could we introduce a separate method without the symlink call that the harness can use? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep no problem, am away in Flanders this weekend so will fix it up as soon as I'm home 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the test
However, adding that file in If I created a new method we would have to change the line https://github.com/golang/dep/blob/master/cmd/dep/integration_test.go#L60 so that it got to call the new method that handled the files not existing. We could however just return an empty string if we got an error in from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be good to have a bit of a shove in the right direction with how to choose to fix this one up. |
||
if err != nil { | ||
h.t.Fatalf("%+v", errors.Wrapf(err, "internal testsuite error: could not get absolute path for dir(%q)", joined)) | ||
} | ||
return abs | ||
return joined | ||
} | ||
|
||
// MustExist fails if path does not exist. | ||
|
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.
What is this?
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.
Empty manifest in final, thought it was needed if we pass the exception test will double check and remove if not needed.
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.
I like the "don't check a nonexistent file" plan you proposed, in which case its not needed.
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.
My question was more about the wierd symbol in the Files Changed area. Likely a "no ending newline" meaning.
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.
Your right i think I can remove it when i get the non existing file issue sorted.
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.
I thought it was probably best to keep this just to make sure that the manifest didn't change as it shouldn't have in this scenario.