Skip to content

Commit

Permalink
Disable broken tests so working tests can be run. (decred#423)
Browse files Browse the repository at this point in the history
Also disable JSON-RPC test harness tests when running with the -short
flag.

Refs decred#421.
  • Loading branch information
jrick authored and alexlyp committed Dec 5, 2016
1 parent ada6129 commit 774d292
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 138 deletions.
134 changes: 0 additions & 134 deletions rpcserver_test.go

This file was deleted.

14 changes: 14 additions & 0 deletions rpctest/rpcharness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package rpctest
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"math"
"os"
Expand Down Expand Up @@ -99,6 +100,14 @@ func funcName(tc rpcTestCase) string {
// TestMain manages the test harnesses and runs the tests instead of go test
// running the tests directly.
func TestMain(m *testing.M) {
flag.Parse()
if testing.Short() {
// Begin tests without any setup/teardown. All tests are disabled in
// short mode.
m.Run()
return
}

// For timing of block generation, create an OnBlockConnected notification
ntfnHandlersNode := dcrrpcclient.NotificationHandlers{
OnBlockConnected: func(blockHeader []byte, transactions [][]byte) {},
Expand Down Expand Up @@ -170,6 +179,11 @@ func TestMain(m *testing.M) {
}

func TestRpcServer(t *testing.T) {
// Skip tests when running with -short
if testing.Short() {
t.Skip("Skipping RPC harness tests in short mode")
}

for _, testCase := range rpcTestCases {
testName := funcName(testCase)
// fmt.Printf("Starting test %s\n", testName)
Expand Down
3 changes: 3 additions & 0 deletions waddrmgr/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

// Test must be updated for API changes.
//+build disabled

package waddrmgr_test

import (
Expand Down
4 changes: 0 additions & 4 deletions waddrmgr/internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import (
"github.com/decred/dcrwallet/snacl"
)

// TstMaxRecentHashes makes the unexported maxRecentHashes constant available
// when tests are run.
var TstMaxRecentHashes = maxRecentHashes

// TstLatestMgrVersion makes the unexported latestMgrVersion variable available
// for change when the tests are run.
var TstLatestMgrVersion = &latestMgrVersion
Expand Down
3 changes: 3 additions & 0 deletions waddrmgr/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

// Test must be updated for API changes.
//+build disabled

package waddrmgr_test

import (
Expand Down
3 changes: 3 additions & 0 deletions walletdb/bdb/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

// Test must be updated for API changes.
//+build disabled

package bdb_test

import (
Expand Down
3 changes: 3 additions & 0 deletions walletdb/bdb/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
// NOTE: When copying this file into the backend driver folder, the package name
// will need to be changed accordingly.

// Test must be updated for API changes.
//+build disabled

package bdb_test

import (
Expand Down
3 changes: 3 additions & 0 deletions walletdb/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

// Test must be updated for API changes.
//+build disabled

package walletdb_test

import (
Expand Down
3 changes: 3 additions & 0 deletions walletdb/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
// NOTE: When copying this file into the backend driver folder, the package name
// will need to be changed accordingly.

// Test must be updated for API changes.
//+build disabled

package walletdb_test

import (
Expand Down

0 comments on commit 774d292

Please sign in to comment.