Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Emil Thelin
    @gummiboll
    Hey! Doing great, how about you?
    Trying to figure out why gock doesn't seem to match the request done in Ping() in ping_test but failing..
    Emil Thelin
    @gummiboll
    Aah, its the custom http.Client{}
    Mehrdad Arshad Rad
    @mehrdadrad
    I'm fine Emil
    Mehrdad Arshad Rad
    @mehrdadrad
    I saw failure one time but the next try it fixed , i didn't spend time on it
    Emil Thelin
    @gummiboll
    I noticed it yesterday when I pushed the last pr that the request in the test is actually being sent and not intercepted by gock. Isn't really a big deal but bugs tend to annoy me :D
    The problem seems to be the custom http.Client{} and more specifically the Transport. If I disable it gock intercepts but as soon as it its defined (even if its defined "empty", ie Transport: &http.Transport{}) gock doesn't intercept it
    Mehrdad Arshad Rad
    @mehrdadrad
    i see
    do you know any similar package (gock)?
    Emil Thelin
    @gummiboll
    Haven't really tried any other packages except the vanilla-go-way, ie net/http/httptest
    Emil Thelin
    @gummiboll
    I think httptest is probably the best way to go. However, the test-server gives a http://127.0.0.1:<random port number>-url and NewPing() doesn't support a url with a port specified in it so it will throw an error. Would however be an easy fix and I think it would be good if hping supports a custom port being specified, ie mylg hping hostname:port
    Emil Thelin
    @gummiboll
    Committed a PR that fixes the test and the host:port-thing. :)
    Mehrdad Arshad Rad
    @mehrdadrad
    very cool, now it supports port and we don't use gock :) Thanks Emil! i'll merge the PR tonight.
    Emil Thelin
    @gummiboll
    Np :)
    Emil Thelin
    @gummiboll
    mehrdadrad: Regarding mehrdadrad/mylg@a6aa5e1
    mehrdadrad: Could it be that you generated the statik-file with a old copy of statik? See rakyll/statik#17
    Mehrdad Arshad Rad
    @mehrdadrad
    @gummiboll looks gofmt is not happy w/ updated statik.go as there is binary inside. This file should be skipped for test gofmt
    Emil Thelin
    @gummiboll
    @mehrdadrad : Yeah, but if you run gofmt with -d you see what it complains about and that is the same thing that PR I mentioned above fixes. I think that you might be running a old version of statik

    When I run gofmt with -d I get: ```@@ -1,7 +1,7 @@
    package statik

    import (

    Meh, doesn't github-markdown work with gitter? :(
    So if you update/build statik and then generate a new statik.go-file from the new binary I think it will pass gofmt. :)
    Mehrdad Arshad Rad
    @mehrdadrad
    Ok thanks @gummiboll I'm already behind the wheel, I'll fix it today :smile:
    Emil Thelin
    @gummiboll
    Tried it and yes, with the latest version of statik, the statik.go file passes gofmt. :)
    Mehrdad Arshad Rad
    @mehrdadrad
    Great, thanks for your help @gummiboll
    Emil Thelin
    @gummiboll
    Np :)
    Emil Thelin
    @gummiboll
    @mehrdadrad: Was trying out the new webgui for mylg and noticed it was a bit slow, checked firebug and it kinda looks like the npm includes from unpkg.com are getting a bit out of hand. Rendering /#/trace generates about 500 requests and most of them are against unpkg.com. Some are 200 but quite a few are 302:s also. Not sure if you've seen it also but might be good to look into.
    Mehrdad Arshad Rad
    @mehrdadrad
    I'll check how can I fix that. Last night I noticed this issue: #17738 github.com/golang/go
    Mehrdad Arshad Rad
    @mehrdadrad
    @gummiboll forgot to mention u at last message
    Emil Thelin
    @gummiboll
    @mehrdadrad: Weird. Tried it and I get the exact same symptom as you; works on macos but not on a linux/amd64
    Mehrdad Arshad Rad
    @mehrdadrad
    @gummiboll I think I found how to fix it, I'll commit it tonight
    Emil Thelin
    @gummiboll
    Great :)
    Mehrdad Arshad Rad
    @mehrdadrad
    @gummiboll Emil when you get a chance try the web trace I think it should be much better
    Emil Thelin
    @gummiboll
    @mehrdadrad: Looks a lot better now! But the trace itself doesn't seem to work for me. Only the first hop (ip/host) is printed and the other hops get 100% packetloss. Not sure if its my FF that bugs or something.
    Can check more thoroughly later.
    Emil Thelin
    @gummiboll
    @mehrdadrad: Yeah, tried both in FF and Chrome. Only the first and last hop gets printed with host/ip/asn/last/avg/etc. All other hops are empty with 100% packetloss. Getting some js-exceptions also
    Mehrdad Arshad Rad
    @mehrdadrad
    @gummiboll that's weird I'll try w/ another laptop and works. I'll test w/ other to see how it works. did you try UDP? maybe NAT issue
    Emil Thelin
    @gummiboll
    @mehrdadrad: Tried both UDP and ICMP. When I run it with ICMP it prints the first and the last hop as I said above and if I run it with UDP it only prints the first hop and then never seem to never reach the last hop
    Hmm. I seem to get the same result if I run it from cli mode which I'm fairly certain has worked before
    @mehrdadrad: I'm running macos sierra/go version go1.7.1 darwin/amd64
    Emil Thelin
    @gummiboll
    @mehrdadrad: Works without a glitch on linux tho
    Emil Thelin
    @gummiboll
    @mehrdadrad: Tried it with a mobile connection and then it works like a charm. The weird thing is that it has worked before and there is nothing extraordinary in front of my laptop. Just a airport. "regular" traceroute works without a glitch also
    Emil Thelin
    @gummiboll
    Heheh, sorry for wall of text :D
    Can do some more digging later and see if I can find what's causing it but now its time for dinner. Been a long day, woke up this morning with snow to my knees and the tractor broke
    Mehrdad Arshad Rad
    @mehrdadrad
    @gummiboll that's very interesting, I need to deep dive to this issue. thank you so much for testing. have fun w/ snow unfortunately we don't have snow @ Los angeles anymore. we need to drive 1-2 hours to see snow.
    Emil Thelin
    @gummiboll
    @mehrdadrad: Found the commit that's causing it. See http://pastebin.com/1uC2MZDb
    So its this one: mehrdadrad/mylg@4431ad2
    Not sure why it causes it to fail tho
    Emil Thelin
    @gummiboll
    Hehe, snow is a blessing and a curse. :D