mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-20 23:07:33 +00:00
911071a4b5
* fix(db): add additional connection pool for projection spooling * use correct connection pool for projections --------- Co-authored-by: Livio Spring <livio.a@gmail.com> (cherry picked from commit fe1337536f9d7e055e53850b060e9ee806b6c1cb)
37 lines
560 B
Go
37 lines
560 B
Go
package dialect
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestDBPurpose_AppName(t *testing.T) {
|
|
tests := []struct {
|
|
p DBPurpose
|
|
want string
|
|
}{
|
|
{
|
|
p: DBPurposeQuery,
|
|
want: QueryAppName,
|
|
},
|
|
{
|
|
p: DBPurposeEventPusher,
|
|
want: EventstorePusherAppName,
|
|
},
|
|
{
|
|
p: DBPurposeProjectionSpooler,
|
|
want: ProjectionSpoolerAppName,
|
|
},
|
|
{
|
|
p: 99,
|
|
want: defaultAppName,
|
|
},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.want, func(t *testing.T) {
|
|
assert.Equal(t, tt.want, tt.p.AppName())
|
|
})
|
|
}
|
|
}
|