Files
photoprism/pkg/net/scheme/scheme_test.go
Michael Mayer 1f4f65e988 Server: Add "force" and "mode" flags for sockets #4673 #4767 #4765 #4467
These changes allow you to force the re-creation of existing Unix domain
sockets and set the permissions of sockets after they have been created.

The flag or variable value for this must be formatted as follows:
--http-host="unix:/var/run/photoprism.sock?force=true&mode=660"

Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-02-04 12:03:00 +01:00

22 lines
451 B
Go

package scheme
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestScheme(t *testing.T) {
t.Run("HTTP", func(t *testing.T) {
assert.Equal(t, "http", Http)
assert.Equal(t, "http+unix", HttpUnix)
assert.Equal(t, "https", Https)
assert.Equal(t, "wss", Websocket)
})
t.Run("Unix", func(t *testing.T) {
assert.Equal(t, "unix", Unix)
assert.Equal(t, "unixgram", Unixgram)
assert.Equal(t, "unixpacket", Unixpacket)
})
}