bundle ngircd config with test resources
Signed-off-by: observer <admin@shr4pnel.com>
This commit is contained in:
@@ -29,12 +29,16 @@ class IrcClientTest {
|
|||||||
@BeforeAll
|
@BeforeAll
|
||||||
fun setup() {
|
fun setup() {
|
||||||
val logFile = File("src/test/resources/logs/ngircd.log")
|
val logFile = File("src/test/resources/logs/ngircd.log")
|
||||||
|
val ngircdConfigPath = javaClass.classLoader.getResource("ngircd.conf")!!.path
|
||||||
logFile.createNewFile()
|
logFile.createNewFile()
|
||||||
processes = ProcessBuilder.startPipeline(
|
processes = ProcessBuilder.startPipeline(
|
||||||
listOf<ProcessBuilder>(
|
listOf<ProcessBuilder>(
|
||||||
ProcessBuilder("ngircd", "-dn").redirectErrorStream(true),
|
// Run IRC server in [-d] debug log mode, with [-n] no daemon, using config [-f] file at path
|
||||||
ProcessBuilder("ts", "(%H:%M:%S)").redirectErrorStream(true),
|
ProcessBuilder("ngircd", "-dnf", ngircdConfigPath).redirectErrorStream(true),
|
||||||
ProcessBuilder("sed", "-ue", "s/\\[[^][]*\\]//g").redirectOutput(logFile)
|
// Remove unhelpful default ngircd info [PID. relative time, GID?]
|
||||||
|
ProcessBuilder("sed", "-ue", "s/\\[[^][]*\\]//g"),
|
||||||
|
// Add relative timestamp
|
||||||
|
ProcessBuilder("ts", "-s", "%H:%M:%.S").redirectOutput(logFile)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
client.scope.launch {
|
client.scope.launch {
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
[GLOBAL]
|
||||||
|
Name = localhost.host
|
||||||
|
AdminInfo1 = FerretIRC Testing Server
|
||||||
|
AdminInfo2 = United Kingdom
|
||||||
|
AdminEMail = admin@shr4pnel.com
|
||||||
|
HelpFile = /usr/share/doc/ngircd/Commands.txt
|
||||||
|
;Info = ngIRCd 28
|
||||||
|
Listen = 127.0.0.1
|
||||||
|
;MotdFile =
|
||||||
|
MotdPhrase = "happy hunting!"
|
||||||
|
;Network =
|
||||||
|
;Password =
|
||||||
|
;PidFile =
|
||||||
|
Ports = 6667
|
||||||
|
ServerGID = 1000
|
||||||
|
ServerUID = 1000
|
||||||
|
|
||||||
|
[LIMITS]
|
||||||
|
ConnectRetry = 60
|
||||||
|
IdleTimeout = 0
|
||||||
|
MaxConnections = 0
|
||||||
|
MaxConnectionsIP = 5
|
||||||
|
MaxJoins = 10
|
||||||
|
MaxNickLength = 9
|
||||||
|
MaxPenaltyTime = 0
|
||||||
|
MaxListSize = 100
|
||||||
|
PingTimeout = 120
|
||||||
|
PongTimeout = 20
|
||||||
|
|
||||||
|
[OPTIONS]
|
||||||
|
AllowedChannelTypes = #&+
|
||||||
|
AllowRemoteOper = no
|
||||||
|
ChrootDir =
|
||||||
|
CloakHost =
|
||||||
|
CloakHostModeX =
|
||||||
|
; CloakHostSalt = koxDpiu[UIF8gF8oHsmtpF8Z?ftyyC(Y
|
||||||
|
CloakUserToNick = no
|
||||||
|
ConnectIPv4 = yes
|
||||||
|
ConnectIPv6 = yes
|
||||||
|
DefaultChannelModes =
|
||||||
|
DefaultUserModes =
|
||||||
|
DNS = no
|
||||||
|
; IncludeDir = /etc/ngircd.conf.d
|
||||||
|
MorePrivacy = no
|
||||||
|
NoticeBeforeRegistration = no
|
||||||
|
OperCanUseMode = no
|
||||||
|
OperChanPAutoOp = yes
|
||||||
|
OperServerMode = no
|
||||||
|
PAM = no
|
||||||
|
PAMIsOptional = yes
|
||||||
|
PAMServiceName = ngircd
|
||||||
|
RequireAuthPing = no
|
||||||
|
ScrubCTCP = no
|
||||||
|
SyslogFacility = local5
|
||||||
|
WebircPassword =
|
||||||
Reference in New Issue
Block a user