mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
support listening on Unix sockets
This commit is contained in:
parent
188eac5cfd
commit
868bb44adf
10 changed files with 202 additions and 34 deletions
|
|
@ -111,3 +111,9 @@ make_snapshot_test!(
|
|||
"A config with the database path inside the media path fails",
|
||||
"database-in-media.toml",
|
||||
);
|
||||
|
||||
make_snapshot_test!(
|
||||
unix_socket,
|
||||
"A config listening to a Unix socket is valid",
|
||||
"unix-socket.toml",
|
||||
);
|
||||
|
|
|
|||
14
tests/integrations/fixtures/check_config/unix-socket.toml
Normal file
14
tests/integrations/fixtures/check_config/unix-socket.toml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
server_name = "example.com"
|
||||
listen = [{ type = "unix", path = "/tmp/grapevine.sock" }]
|
||||
|
||||
[server_discovery]
|
||||
client.base_url = "https://matrix.example.com"
|
||||
|
||||
[database]
|
||||
backend = "rocksdb"
|
||||
path = "tests/integrations/fixtures/check_config/dirs/a"
|
||||
|
||||
[media.backend]
|
||||
type = "filesystem"
|
||||
path = "tests/integrations/fixtures/check_config/dirs/b"
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
source: tests/integrations/check_config.rs
|
||||
description: A config listening to a Unix socket is valid
|
||||
---
|
||||
Some(
|
||||
0,
|
||||
)
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
source: tests/integrations/check_config.rs
|
||||
description: A config listening to a Unix socket is valid
|
||||
---
|
||||
[
|
||||
{
|
||||
"fields": {
|
||||
"message": "Configuration looks good"
|
||||
},
|
||||
"level": "INFO",
|
||||
"target": "grapevine::cli::check_config",
|
||||
"timestamp": "[timestamp]"
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
source: tests/integrations/check_config.rs
|
||||
description: A config listening to a Unix socket is valid
|
||||
---
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue