Allow some tests to run without network (#20955)
* thttpclient.nim: respect NIM_TESTAMENT_REMOTE_NETWORKING * tnetconnect.nim: respect NIM_TESTAMENT_REMOTE_NETWORKING
This commit is contained in:
parent
15d00ca0e1
commit
b5a008bac8
2 changed files with 8 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ from net import TimeoutError
|
||||||
import nativesockets, os, httpclient, asyncdispatch
|
import nativesockets, os, httpclient, asyncdispatch
|
||||||
|
|
||||||
import std/[assertions, syncio]
|
import std/[assertions, syncio]
|
||||||
|
from stdtest/testutils import enableRemoteNetworking
|
||||||
|
|
||||||
const manualTests = false
|
const manualTests = false
|
||||||
|
|
||||||
|
|
@ -178,5 +179,7 @@ proc ipv6Test() =
|
||||||
client.close()
|
client.close()
|
||||||
|
|
||||||
ipv6Test()
|
ipv6Test()
|
||||||
syncTest()
|
|
||||||
waitFor(asyncTest())
|
when enableRemoteNetworking:
|
||||||
|
syncTest()
|
||||||
|
waitFor(asyncTest())
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ discard """
|
||||||
|
|
||||||
import std/net
|
import std/net
|
||||||
from std/strutils import `%`
|
from std/strutils import `%`
|
||||||
|
from stdtest/testutils import enableRemoteNetworking
|
||||||
|
|
||||||
# bug #15215
|
# bug #15215
|
||||||
proc test() =
|
proc test() =
|
||||||
|
|
@ -25,4 +26,5 @@ proc test() =
|
||||||
except TimeoutError, OSError:
|
except TimeoutError, OSError:
|
||||||
fn("www.google.com")
|
fn("www.google.com")
|
||||||
|
|
||||||
test()
|
when enableRemoteNetworking:
|
||||||
|
test()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue