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

Allow for binaries to be installed via go install #1096

Closed
pete0emerson opened this issue Apr 8, 2022 · 6 comments
Closed

Allow for binaries to be installed via go install #1096

pete0emerson opened this issue Apr 8, 2022 · 6 comments

Comments

@pete0emerson
Copy link
Contributor

pete0emerson commented Apr 8, 2022

Since this is golang tooling, I'd like to be able to use native go tooling to install the binary:

 ~ $ go install github.com/gruntwork-io/terratest@latest
go install: github.com/gruntwork-io/terratest@latest: module github.com/gruntwork-io/terratest@latest found
 (v0.40.6), but does not contain package github.com/gruntwork-io/terratest
@yorinasub17
Copy link
Contributor

The path needs to point to where the main code is for the command, which is in cmd/terratest_log_parser. So in this case, you can install the log parser with:

go install github.com/gruntwork-io/terratest/cmd/terratest_log_parser@latest

Similarly, to install pick-instance-type, you can run:

go install github.com/gruntwork-io/terratest/cmd/pick-instance-type@latest

@pete0emerson
Copy link
Contributor Author

Ah, nice. I'll close this out.

@loupgaroublond
Copy link

loupgaroublond commented Apr 11, 2022

~ $ go install github.com/gruntwork-io/terratest/cmd/terratest_log_parser@latest
go: downloading github.com/gruntwork-io/go-commons v0.8.0
go: downloading github.com/urfave/cli v1.22.2
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading github.com/go-errors/errors v1.0.2-0.20180813162953-d98b870cc4e0
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.0
go: downloading github.com/russross/blackfriday/v2 v2.1.0

that worked beautifully, and clearly the problem is a lack of experience with go-lang - any chance you folks might document these two install commands somewhere for other go-lang newbies encountering this?

EDIT: also, thank you for this help, I noticed I accidentally a word before I commentated :)

@yorinasub17
Copy link
Contributor

Sure! I'll open a PR with the documentation update shortly.

@yorinasub17
Copy link
Contributor

PR with docs update: #1098

@maha51ece-tech
Copy link

How to install terratest_log_parser for Github actions step during run time.How can i see those 3 files created during test run

I have below in my yaml file

  - name: Run Assertion Tests
    run: |
      cd test 
      go install github.com/gruntwork-io/terratest/cmd/terratest_log_parser@latest
      go install github.com/gruntwork-io/terratest/cmd/pick-instance-type@latest
      go test -v ./... -timeout 30m | tee test_output.log
      terratest_log_parser -testlog test_output.log -outputdir test_output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants