github.com/unicornultrafoundation/go-u2u@v1.0.0-rc1.0.20240205080301-e74a83d3fadc/integration/metric_test.go (about) 1 package integration 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/require" 7 ) 8 9 func TestGenericNameOfTmpDB(t *testing.T) { 10 require := require.New(t) 11 12 for name, exp := range map[string]string{ 13 "": "", 14 "main": "main", 15 "main-single": "main-single", 16 "hashgraph-0": "hashgraph-tmp", 17 "hashgraph-0999": "hashgraph-tmp", 18 "gossip-50": "gossip-tmp", 19 "epoch-1": "epoch-tmp", 20 "xxx-1a": "xxx-1a", 21 "123": "123", 22 } { 23 got := genericNameOfTmpDB(name) 24 require.Equal(exp, got, name) 25 } 26 }