MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / TestConnectDB_Failure

Function TestConnectDB_Failure

database/db_test.go:92–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

90}
91
92func TestConnectDB_Failure(t *testing.T) {
93 // Provide an invalid DNS string to simulate a failure
94 invalidDNS := "invalid-dns"
95
96 db, err := ConnectDB(config.DataSourceConfig{Dns: invalidDNS})
97 assert.Error(t, err)
98 assert.Nil(t, db)
99}

Callers

nothing calls this directly

Calls 2

ConnectDBFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected