INNER CODE UNIT · Go
TestSetupDBFail
rameshsunkara/go-rest-api-example · main_test.go:21
func TestSetupDBFail(t *testing.T) {
t.Parallel()
svcEnv := &config.ServiceEnvConfig{
DBHosts: "localhost",
DBName: "db",
DBCredentialsSideCar: "/notfound",
}
_, err := setupDB(svcEnv)
require.Error(t, err)
}
func TestServiceName(t *testing.T) {
t.Parallel()
// Test the service name constant
assert.Equal(t, "ecommerce-orders", serviceName)
}