Merge pull request #13630 from hashicorp/b-critical-typo
boltdd: fixup typo and use unreachable assertion
This commit is contained in:
commit
9861afcbe7
2
go.mod
2
go.mod
|
@ -109,7 +109,7 @@ require (
|
|||
github.com/ryanuber/go-glob v1.0.0
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529
|
||||
github.com/shirou/gopsutil/v3 v3.21.12
|
||||
github.com/shoenig/test v0.2.6
|
||||
github.com/shoenig/test v0.2.8
|
||||
github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1170,8 +1170,8 @@ github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880/go.mod h1:5b4v6he4
|
|||
github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA=
|
||||
github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA=
|
||||
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
|
||||
github.com/shoenig/test v0.2.6 h1:G7QP1jygTmhhNc0TKZ5O87CvB919YjL8EXnsD1aiaHo=
|
||||
github.com/shoenig/test v0.2.6/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0=
|
||||
github.com/shoenig/test v0.2.8 h1:OYhNGu1rgjscDDUsAOGEb/pTbB4IwhuIDu4kQ1RJSvI=
|
||||
github.com/shoenig/test v0.2.8/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
|
|
|
@ -111,7 +111,7 @@ func TestBucket_Iterate(t *testing.T) {
|
|||
must.NotNil(t, b)
|
||||
|
||||
must.NoError(t, b.Put([]byte("ceo"), employee{Name: "dave", ID: 15}))
|
||||
must.NoError(t, b.Put([]byte("founder"), employee{Name: "mitchel", ID: 1}))
|
||||
must.NoError(t, b.Put([]byte("founder"), employee{Name: "mitchell", ID: 1}))
|
||||
must.NoError(t, b.Put([]byte("cto"), employee{Name: "armon", ID: 2}))
|
||||
return nil
|
||||
}))
|
||||
|
@ -126,7 +126,7 @@ func TestBucket_Iterate(t *testing.T) {
|
|||
})
|
||||
must.NoError(t, err)
|
||||
must.Eq(t, []employee{
|
||||
{"dave", 15}, {"armon", 2}, {"mitchel", 1},
|
||||
{"dave", 15}, {"armon", 2}, {"mitchell", 1},
|
||||
}, result)
|
||||
})
|
||||
|
||||
|
@ -135,7 +135,7 @@ func TestBucket_Iterate(t *testing.T) {
|
|||
b := tx.Bucket(bucket)
|
||||
// will fail to encode employee into an int
|
||||
return Iterate(b, nil, func(key []byte, i int) {
|
||||
must.True(t, false) // must not get here
|
||||
must.Unreachable(t)
|
||||
})
|
||||
})
|
||||
must.Error(t, err)
|
||||
|
@ -158,7 +158,7 @@ func TestBucket_DeletePrefix(t *testing.T) {
|
|||
must.NoError(t, b.Put([]byte("intern_a"), employee{Name: "alice", ID: 7384}))
|
||||
must.NoError(t, b.Put([]byte("exec_c"), employee{Name: "armon", ID: 2}))
|
||||
must.NoError(t, b.Put([]byte("intern_b"), employee{Name: "bob", ID: 7312}))
|
||||
must.NoError(t, b.Put([]byte("exec_b"), employee{Name: "mitchel", ID: 1}))
|
||||
must.NoError(t, b.Put([]byte("exec_b"), employee{Name: "mitchell", ID: 1}))
|
||||
return nil
|
||||
}))
|
||||
|
||||
|
@ -178,7 +178,7 @@ func TestBucket_DeletePrefix(t *testing.T) {
|
|||
})
|
||||
must.NoError(t, err)
|
||||
must.Eq(t, []employee{
|
||||
{"dave", 15}, {"mitchel", 1}, {"armon", 2},
|
||||
{"dave", 15}, {"mitchell", 1}, {"armon", 2},
|
||||
}, result)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue