So lets say I have a package that relies on a configuration.
In my dev environment I run 'go test' against the package and the 
configurations for dev.
It passes the tests so I build out this package and artifact the resulting 
binary.

This artifact then continues to a staging environment that has its own 
configurations.
I was wondering if its possible to run those same tests against the binary 
instead of having the source rebuild?
This is to verify that the binary works across different environments.

Or am I approaching this incorrectly? 





On Friday, April 21, 2017 at 9:34:52 AM UTC-7, Ian Lance Taylor wrote:
>
> On Fri, Apr 21, 2017 at 9:30 AM, st ov <so.q...@gmail.com <javascript:>> 
> wrote: 
> > Is it not possible? The doc seems to say that 'go test' recompiles each 
> > package tested 
> > https://golang.org/cmd/go/#hdr-Test_packages 
>
> `go test` is for testing packages separately.  I don't really know 
> what you mean by "run tests against a specific Go binary." 
>
> Ian 
>
>
> > On Thursday, April 20, 2017 at 10:00:24 AM UTC-7, st ov wrote: 
> >> 
> >> As part of a build pipeline, I want to initially artifact the Go binary 
> to 
> >> send through all the stages from development to production. 
> >> 
> >> How can I run a set of tests (*_test.go) against this one binary? Can I 
> >> only have blackbox tests or is whitebox possible? 
> >> 
> >> Or will the approach need to be, to run 'go test' against the package 
> code 
> >> at every step and rebuild? 
> >> 
> >> How do you handle delivering and deploying your builds? 
> >> 
> >> 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "golang-nuts" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to golang-nuts...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to