Skip to content

Commit

Permalink
Added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRoettges committed Jun 10, 2024
1 parent 72c8ef0 commit c8e1299
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions crl/crlstore/storetype_test.go
Original file line number Diff line number Diff line change
@@ -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)
})
}
}

0 comments on commit c8e1299

Please sign in to comment.