浏览代码

don't run http tests locally

Aleksandr Kuzmenko 6 年之前
父节点
当前提交
158db6c0a8
共有 2 个文件被更改,包括 13 次插入3 次删除
  1. 5 3
      tests/RunCi.hx
  2. 8 0
      tests/unit/src/unit/TestHttp.hx

+ 5 - 3
tests/RunCi.hx

@@ -31,9 +31,11 @@ class RunCi {
 
 		infoMsg('Going to test: $tests');
 
-		changeDirectory('echoServer');
-		runCommand('haxe', ['build.hxml']);
-		changeDirectory(cwd);
+		if (isCi()) {
+			changeDirectory('echoServer');
+			runCommand('haxe', ['build.hxml']);
+			changeDirectory(cwd);
+		}
 
 		for (test in tests) {
 			switch (ci) {

+ 8 - 0
tests/unit/src/unit/TestHttp.hx

@@ -12,6 +12,14 @@ class TestHttp extends Test {
 	}
 
 	function run(async:Async, test:()->Void) {
+		// { comment this out to run http tests locally
+		#if !azure
+		noAssert();
+		async.done();
+		return;
+		#end
+		// }
+
 		#if (js && !nodejs)
 		if(js.Syntax.code('typeof XMLHttpRequest == "undefined"')) {
 			noAssert();