• Akram Ben Aissi's avatar
    Fixes an issue with hosts having an IPv6 address on localhost · 0883bfa6
    Akram Ben Aissi authored
    - When 'getent hosts localhost' returns '::1' the creation of the
      listener fails because of the port parsing which uses ":" as a
    separator
    - Use of net.SplitHostPort() to do the job
    - Adding unit tests to ensure that the creation succeeds
    - On docker.go: adds a test on the presence the socat command which was
      failing silenty if not installed
    
    - Code Review 1
      - Fixed typo on Expected
      - The UT now fails if the PortForwarder could not be created
    
    - Code Review 2
      - Simplify socat error message
      - Changing t.Fatal to to.Error on unit tests
    
    - Code Review 3
      - Removing useless uses cases in unit tests
    
    - Code Review 4
      - Removing useless initiliasiation of PortForwarder
      - Changing error message
    
    - Code Review 5
      - Simplifying TestCast struct
      - Adding addition test in one test case
      - Closing the listener
    
    - Code Review 6
      - Improving unit test
    0883bfa6
Name
Last commit
Last update
..
doc.go Loading commit data...
portforward.go Loading commit data...
portforward_test.go Loading commit data...