github.com/osdi23p228/fabric@v0.0.0-20221218062954-77808885f5db/internal/peer/node/upgrade_dbs_test.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package node 8 9 import ( 10 "os" 11 "testing" 12 13 "github.com/spf13/viper" 14 "github.com/stretchr/testify/assert" 15 ) 16 17 func TestUpgradeDBsCmd(t *testing.T) { 18 testPath := "/tmp/hyperledger/test" 19 os.RemoveAll(testPath) 20 viper.Set("peer.fileSystemPath", testPath) 21 defer os.RemoveAll(testPath) 22 23 cmd := upgradeDBsCmd() 24 assert.NoError(t, cmd.Execute()) 25 }