Disable Codecov Patch As It Is Unreliable (#713)

This commit is contained in:
Raul Jordan 2018-10-30 17:00:20 +01:00 committed by GitHub
parent 370065593f
commit 95625629f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 5 deletions

26
.codecov.yml Normal file
View File

@ -0,0 +1,26 @@
codecov:
notify:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: "70...100"
status:
project: yes
patch: no
changes: no
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "header, diff"
behavior: default
require_changes: no

View File

@ -46,6 +46,7 @@ func (db *BeaconDB) GetAttestation(hash [32]byte) (*types.Attestation, error) {
// HasAttestation checks if the attestation exists.
func (db *BeaconDB) HasAttestation(hash [32]byte) bool {
exists := false
// #nosec G104
db.view(func(tx *bolt.Tx) error {
a := tx.Bucket(attestationBucket)

View File

@ -49,6 +49,7 @@ func (db *BeaconDB) GetBlock(hash [32]byte) (*types.Block, error) {
// HasBlock accepts a block hash and returns true if the block does not exist.
func (db *BeaconDB) HasBlock(hash [32]byte) bool {
hasBlock := false
// #nosec G104
_ = db.view(func(tx *bolt.Tx) error {
b := tx.Bucket(blockBucket)

View File

@ -52,9 +52,11 @@ func NewDB(dirPath string) (*BeaconDB, error) {
db := &BeaconDB{db: boltDB}
db.update(func(tx *bolt.Tx) error {
if err := db.update(func(tx *bolt.Tx) error {
return createBuckets(tx, blockBucket, attestationBucket, mainChainBucket, chainInfoBucket)
})
}); err != nil {
return nil, err
}
return db, nil
return db, err
}

View File

@ -18,7 +18,7 @@ func TestNodeValidator_Builds(t *testing.T) {
app := cli.NewApp()
set := flag.NewFlagSet("test", 0)
set.String("web3provider", "ws//127.0.0.1:8546", "web3 provider ws or IPC endpoint")
tmp := fmt.Sprintf("%s/datadir", os.TempDir())
tmp := fmt.Sprintf("%s/datadirtest1", os.TempDir())
set.String("datadir", tmp, "node data directory")
set.Bool("enable-powchain", true, "enable powchain")
@ -39,6 +39,8 @@ func TestNodeValidator_Builds(t *testing.T) {
if e, ok := err.(*exec.ExitError); !ok || e.Success() {
t.Fatalf("Process ran with err %v, want exit status 1", err)
}
tmp := fmt.Sprintf("%s/datadirtest1", os.TempDir())
os.RemoveAll(tmp)
}
// Test that beacon chain node can close.
@ -47,7 +49,7 @@ func TestNodeClose(t *testing.T) {
app := cli.NewApp()
set := flag.NewFlagSet("test", 0)
set.String("web3provider", "ws//127.0.0.1:8546", "web3 provider ws or IPC endpoint")
tmp := fmt.Sprintf("%s/datadir", os.TempDir())
tmp := fmt.Sprintf("%s/datadirtest2", os.TempDir())
set.String("datadir", tmp, "node data directory")
set.Bool("enable-powchain", false, "no powchain service")
set.Bool("demo-config", true, "demo configuration")