diff options
Diffstat (limited to 'test/acceptance/config_test.go')
-rw-r--r-- | test/acceptance/config_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/acceptance/config_test.go b/test/acceptance/config_test.go index 07697c48..95be6e17 100644 --- a/test/acceptance/config_test.go +++ b/test/acceptance/config_test.go @@ -4,6 +4,7 @@ import ( "fmt" "net" "net/http" + "path/filepath" "testing" "github.com/stretchr/testify/require" @@ -64,3 +65,24 @@ func TestMultipleListenersFromEnvironmentVariables(t *testing.T) { require.Equal(t, http.StatusOK, rsp.StatusCode) } } + +func TestUnixSocketListener(t *testing.T) { + tmp := t.TempDir() + sockPath := filepath.Join(tmp, "unix.sock") + + spec := ListenSpec{ + Type: "unix", + Host: sockPath, + } + + RunPagesProcess(t, + withListeners([]ListenSpec{spec}), + ) + require.NoError(t, spec.WaitUntilRequestSucceeds(nil)) + + rsp, err := GetPageFromListener(t, spec, "group.gitlab-example.com", "project/") + + require.NoError(t, err) + rsp.Body.Close() + require.Equal(t, http.StatusOK, rsp.StatusCode) +} |