On Tue, Nov 19, 2019 at 6:37 AM burak serdar wrote:
> On Mon, Nov 18, 2019 at 10:24 PM Shane H wrote:
> >
> >
> >
> > On Tuesday, November 19, 2019 at 4:11:52 PM UTC+11, burak serdar wrote:
> >>
> >>
> >>
> >> This is what I usually do in these situations:
> >>
> >> var amqpDial=amqp.Dial
> >>
On Mon, Nov 18, 2019 at 10:24 PM Shane H wrote:
>
>
>
> On Tuesday, November 19, 2019 at 4:11:52 PM UTC+11, burak serdar wrote:
>>
>>
>>
>> This is what I usually do in these situations:
>>
>> var amqpDial=amqp.Dial
>> func (mq *MQ) Connect() (err error) {
>> ...
>>mq.conn, err = amqpDial(m
On Tuesday, November 19, 2019 at 4:11:52 PM UTC+11, burak serdar wrote:
>
>
>
> This is what I usually do in these situations:
>
> var amqpDial=amqp.Dial
> func (mq *MQ) Connect() (err error) {
> ...
>mq.conn, err = amqpDial(mq.URI)
> ...
> }
>
> func TestConnect(t *testing.T) {
On Mon, Nov 18, 2019 at 10:00 PM Shane H wrote:
>
> I'm trying to unit test some code (pasted below). I've struggled to find a
> way to mock the amqp.Connection, so have decided to go the monkey patching
> route.
>
> The test 'works' but only if I use the following incantation
> go test -gcflags
I'm trying to unit test some code (pasted below). I've struggled to find a
way to mock the amqp.Connection, so have decided to go the monkey patching
route.
The test 'works' but only if I use the following incantation
go test -gcflags=-l
So, my next step is to ensure that -gcflags is set to pr