aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorElad <theman@elad.im>2018-10-02 20:59:58 +0800
committerAnton Evangelatov <anton.evangelatov@gmail.com>2018-10-02 20:59:58 +0800
commitbd1f7ebda27d57002b6a04a95812420a40117b3a (patch)
tree231c5f50e2c0926725419056f2ac3320eb782b2c /cmd
parent26a37c5351d14ca3eea1efa5b4128166f7d8ec74 (diff)
downloadgo-tangerine-bd1f7ebda27d57002b6a04a95812420a40117b3a.tar
go-tangerine-bd1f7ebda27d57002b6a04a95812420a40117b3a.tar.gz
go-tangerine-bd1f7ebda27d57002b6a04a95812420a40117b3a.tar.bz2
go-tangerine-bd1f7ebda27d57002b6a04a95812420a40117b3a.tar.lz
go-tangerine-bd1f7ebda27d57002b6a04a95812420a40117b3a.tar.xz
go-tangerine-bd1f7ebda27d57002b6a04a95812420a40117b3a.tar.zst
go-tangerine-bd1f7ebda27d57002b6a04a95812420a40117b3a.zip
cmd/swarm: fix appveyor build (#17808)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/swarm/export_test.go6
-rw-r--r--cmd/swarm/run_test.go3
-rw-r--r--cmd/swarm/upload_test.go22
3 files changed, 24 insertions, 7 deletions
diff --git a/cmd/swarm/export_test.go b/cmd/swarm/export_test.go
index 20df7b060..c533511af 100644
--- a/cmd/swarm/export_test.go
+++ b/cmd/swarm/export_test.go
@@ -14,8 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
-// +build !windows
-
package main
import (
@@ -26,6 +24,7 @@ import (
"io/ioutil"
"net/http"
"os"
+ "runtime"
"strings"
"testing"
@@ -40,6 +39,9 @@ import (
// 5. imports the exported datastore
// 6. fetches the uploaded random file from the second node
func TestCLISwarmExportImport(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ t.Skip()
+ }
cluster := newTestCluster(t, 1)
// generate random 10mb file
diff --git a/cmd/swarm/run_test.go b/cmd/swarm/run_test.go
index 4be0495f8..6d2a86f4b 100644
--- a/cmd/swarm/run_test.go
+++ b/cmd/swarm/run_test.go
@@ -19,6 +19,7 @@ package main
import (
"context"
"crypto/ecdsa"
+ "flag"
"fmt"
"io/ioutil"
"net"
@@ -41,6 +42,8 @@ import (
"github.com/ethereum/go-ethereum/swarm"
)
+var loglevel = flag.Int("loglevel", 3, "verbosity of logs")
+
func init() {
// Run the app if we've been exec'd as "swarm-test" in runSwarm.
reexec.Register("swarm-test", func() {
diff --git a/cmd/swarm/upload_test.go b/cmd/swarm/upload_test.go
index 84205031b..e8161680f 100644
--- a/cmd/swarm/upload_test.go
+++ b/cmd/swarm/upload_test.go
@@ -14,13 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
-// +build !windows
-
package main
import (
"bytes"
- "flag"
"fmt"
"io"
"io/ioutil"
@@ -28,6 +25,7 @@ import (
"os"
"path"
"path/filepath"
+ "runtime"
"strings"
"testing"
"time"
@@ -37,8 +35,6 @@ import (
"github.com/mattn/go-colorable"
)
-var loglevel = flag.Int("loglevel", 3, "verbosity of logs")
-
func init() {
log.PrintOrigins(true)
log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(*loglevel), log.StreamHandler(colorable.NewColorableStderr(), log.TerminalFormat(true))))
@@ -47,18 +43,31 @@ func init() {
// TestCLISwarmUp tests that running 'swarm up' makes the resulting file
// available from all nodes via the HTTP API
func TestCLISwarmUp(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ t.Skip()
+ }
+
testCLISwarmUp(false, t)
}
func TestCLISwarmUpRecursive(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ t.Skip()
+ }
testCLISwarmUpRecursive(false, t)
}
// TestCLISwarmUpEncrypted tests that running 'swarm encrypted-up' makes the resulting file
// available from all nodes via the HTTP API
func TestCLISwarmUpEncrypted(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ t.Skip()
+ }
testCLISwarmUp(true, t)
}
func TestCLISwarmUpEncryptedRecursive(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ t.Skip()
+ }
testCLISwarmUpRecursive(true, t)
}
@@ -279,6 +288,9 @@ func testCLISwarmUpRecursive(toEncrypt bool, t *testing.T) {
// TestCLISwarmUpDefaultPath tests swarm recursive upload with relative and absolute
// default paths and with encryption.
func TestCLISwarmUpDefaultPath(t *testing.T) {
+ if runtime.GOOS == "windows" {
+ t.Skip()
+ }
testCLISwarmUpDefaultPath(false, false, t)
testCLISwarmUpDefaultPath(false, true, t)
testCLISwarmUpDefaultPath(true, false, t)