-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Xirsys' local region urls with the global (recommended) one
- Loading branch information
1 parent
34918c5
commit 3740f35
Showing
2 changed files
with
21 additions
and
1 deletion.
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
15 changes: 15 additions & 0 deletions
15
src/test/kotlin/com/faforever/icebreaker/service/xirsys/XirsysSessionHandlerTest.kt
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,15 @@ | ||
package com.faforever.icebreaker.service.xirsys | ||
|
||
import org.junit.jupiter.api.Assertions.assertEquals | ||
import org.junit.jupiter.api.Test | ||
|
||
class XirsysSessionHandlerTest { | ||
@Test | ||
fun `it should replace xirsys urls with global one and normalize the protocol`() { | ||
val input = "stun:fr-turn1.xirsys.com" | ||
|
||
val result = XirsysSessionHandler.normalizeAndReplaceUriWithGlobal(input) | ||
|
||
assertEquals("stun://global.xirsys.net", result) | ||
} | ||
} |