- Notifications
You must be signed in to change notification settings - Fork18
Use release binary in integration tests#98
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -32,11 +32,14 @@ func init() { | ||
// build the coder-cli binary and move to the integration testing bin directory | ||
func build(path string) error { | ||
tar := fmt.Sprintf("coder-cli-linux-amd64.tar.gz") | ||
dir := filepath.Dir(path) | ||
cmd := exec.Command( | ||
"sh", "-c", | ||
fmt.Sprintf( | ||
"cd ../../ && mkdir -p %s && ./ci/steps/build.sh && cp ./ci/bin/%s %s/ && tar -xzf %s -C %s", | ||
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. What if you just pulled the go build command into its own function and source it so you can call it? Would remove the step of tar -> untar 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'd prefer it to use as close to the actual release artifact as possible. Maybe that's not particularly rational in this case but the aim of this test is to prevent the previous regression from going undetected. 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. Makes sense | ||
dir, tar, dir, filepath.Join(dir, tar), dir), | ||
) | ||
out, err := cmd.CombinedOutput() | ||
if err != nil { | ||