@@ -29,7 +29,6 @@ class QueueConfigServiceStub {
29
29
configs : {
30
30
'5cp' : 'etf2l_6v6_5cp' ,
31
31
} ,
32
- execConfigs : [ 'test' ] ,
33
32
} as Partial < QueueConfig > ;
34
33
}
35
34
@@ -106,7 +105,6 @@ describe('ServerConfiguratorService', () => {
106
105
expect ( spy ) . toHaveBeenCalledWith ( kickAll ( ) ) ;
107
106
expect ( spy ) . toHaveBeenCalledWith ( changelevel ( 'cp_badlands' ) ) ;
108
107
expect ( spy ) . toHaveBeenCalledWith ( execConfig ( 'etf2l_6v6_5cp' ) ) ;
109
- expect ( spy ) . toHaveBeenCalledWith ( execConfig ( 'test' ) ) ;
110
108
expect ( spy ) . toHaveBeenCalledWith ( jasmine . stringMatching ( / ^ s v _ p a s s w o r d \s .+ $ / ) ) ;
111
109
expect ( spy ) . toHaveBeenCalledWith ( addGamePlayer ( 'PLAYER_1_STEAMID' , 'PLAYER_1_NAME' , 2 , 'soldier' ) ) ;
112
110
expect ( spy ) . toHaveBeenCalledWith ( addGamePlayer ( 'PLAYER_2_STEAMID' , 'PLAYER_2_NAME' , 3 , 'soldier' ) ) ;
@@ -127,6 +125,18 @@ describe('ServerConfiguratorService', () => {
127
125
} ) ;
128
126
} ) ;
129
127
128
+ describe ( 'when the execConfigs is set' , ( ) => {
129
+ beforeEach ( ( ) => {
130
+ queueConfigService . queueConfig . execConfigs = [ 'test' ] ;
131
+ } ) ;
132
+
133
+ it ( 'should execute the configs' , async ( ) => {
134
+ const spy = jest . spyOn ( rcon , 'send' ) ;
135
+ await service . configureServer ( gameServer as any , game as any ) ;
136
+ expect ( spy ) . toHaveBeenCalledWith ( execConfig ( 'test' ) ) ;
137
+ } ) ;
138
+ } ) ;
139
+
130
140
it ( 'should close the rcon connection' , async ( ) => {
131
141
const spy = jest . spyOn ( rcon , 'end' ) ;
132
142
await service . configureServer ( gameServer as any , game as any ) ;
0 commit comments