-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added config testing (odyssey --test) (#537)
* added configuration testing (odyssey --test) * fixes * fix names * fix names * apply fmt * start create tests * rebuild * tests done * --test no longer forks the process * config without rules is no longer valid * fix tests * fix storage_type tests * fix storage_tls tests * fix config-examples/odyssey-aq.conf * change .gitignore * rm .DS_Store
- Loading branch information
1 parent
5f4e64d
commit 9a42394
Showing
101 changed files
with
1,709 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ docker/bin/odyssey-asan | |
odyssey.conf.example | ||
odyssey.init | ||
odyssey.logrotate | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
docker/config-validation/configs/auth_query/invalid/odyssey-test1.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "none" | ||
auth_query "auth_query" | ||
auth_query_db "db" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
docker/config-validation/configs/auth_query/invalid/odyssey-test2.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "none" | ||
auth_query "auth_query" | ||
auth_query_user "user" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
docker/config-validation/configs/auth_query/invalid/odyssey-test3.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "none" | ||
auth_query "auth_query" | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
docker/config-validation/configs/auth_query/valid/odyssey-test1.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "none" | ||
auth_query "auth_query" | ||
auth_query_user "user" | ||
auth_query_db "db" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
docker/config-validation/configs/authentication/invalid/odyssey-test1.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "md5" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
docker/config-validation/configs/authentication/invalid/odyssey-test2.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "scram-sha-256" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
docker/config-validation/configs/authentication/invalid/odyssey-test3.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "kek" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
docker/config-validation/configs/authentication/valid/odyssey-test1.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "none" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
docker/config-validation/configs/authentication/valid/odyssey-test10.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "cert" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
docker/config-validation/configs/authentication/valid/odyssey-test2.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "block" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
docker/config-validation/configs/authentication/valid/odyssey-test3.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "clear_text" | ||
password "password" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
docker/config-validation/configs/authentication/valid/odyssey-test4.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "md5" | ||
password "password" | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
docker/config-validation/configs/authentication/valid/odyssey-test5.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "md5" | ||
auth_query "auth_query" | ||
auth_query_user "user" | ||
auth_query_db "db" | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
docker/config-validation/configs/authentication/valid/odyssey-test6.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "scram-sha-256" | ||
auth_query "auth_query" | ||
auth_query_user "user" | ||
auth_query_db "db" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
docker/config-validation/configs/authentication/valid/odyssey-test7.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
unix_socket_dir "/tmp" | ||
unix_socket_mode "0644" | ||
|
||
log_format "%p %t %l [%i %s] (%c) %m\n" | ||
|
||
listen { | ||
host "*" | ||
} | ||
|
||
storage "postgres_server" { | ||
type "remote" | ||
} | ||
|
||
database "db" { | ||
user "user" { | ||
storage "postgres_server" | ||
pool "session" | ||
authentication "scram-sha-256" | ||
password "password" | ||
} | ||
} |
Oops, something went wrong.