diff --git a/crl/crlstore/storetype_test.go b/crl/crlstore/storetype_test.go new file mode 100644 index 0000000..2dffe57 --- /dev/null +++ b/crl/crlstore/storetype_test.go @@ -0,0 +1,26 @@ +package crlstore + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestStoreTypeToString(t *testing.T) { + tests := []struct { + storeType StoreType + expected string + }{ + {LevelDB, "Level DB"}, + {Map, "Map"}, + {StoreType(2), "unknown store type 2"}, + {StoreType(-1), "unknown store type -1"}, + } + + for _, test := range tests { + t.Run(test.expected, func(t *testing.T) { + result := StoreTypeToString(test.storeType) + assert.Equal(t, test.expected, result) + }) + } +}