mirror of
https://github.com/gofiber/storage.git
synced 2025-09-30 22:32:20 +08:00
chore: simplify testing panics
This commit is contained in:
@@ -236,14 +236,11 @@ func Test_Postgres_Non_UTF8(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_SslRequiredMode(t *testing.T) {
|
||||
defer func() {
|
||||
if recover() == nil {
|
||||
require.Equalf(t, true, nil, "Connection was established with a `require`")
|
||||
}
|
||||
}()
|
||||
_ = New(Config{
|
||||
Reset: true,
|
||||
})
|
||||
require.Panics(t, func() {
|
||||
_ = New(Config{
|
||||
Reset: true,
|
||||
})
|
||||
}, "Expected panic when connecting to Postgres with SSL mode set to require")
|
||||
}
|
||||
|
||||
func Test_Postgres_Conn(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user