Example #1
0
package postgres_test

import (
	. "github.com/onsi/ginkgo"
	//. "github.com/onsi/gomega"

	_ "github.com/lib/pq"

	"github.com/theduke/go-apperror"
	db "github.com/theduke/go-dukedb"
	"github.com/theduke/go-dukedb/backends/sql"
	"github.com/theduke/go-dukedb/backends/tests"
)

func builder() (db.Backend, apperror.Error) {
	return sql.New("postgres", "postgres://@localhost:10001/test?sslmode=disable")
}

var _ = Describe("Postgres", func() {
	tests.TestBackend(&setupFailed, builder)
})
Example #2
0
package memory_test

import (
	. "github.com/onsi/ginkgo"
	//. "github.com/onsi/gomega"

	"github.com/theduke/go-apperror"
	db "github.com/theduke/go-dukedb"
	. "github.com/theduke/go-dukedb/backends/memory"
	"github.com/theduke/go-dukedb/backends/tests"
)

var _ = Describe("Memory", func() {
	var skip = false
	tests.TestBackend(&skip, func() (db.Backend, apperror.Error) {
		return New(), nil
	})
})
Example #3
0
package mysql_test

import (
	. "github.com/onsi/ginkgo"
	//. "github.com/onsi/gomega"

	"github.com/theduke/go-dukedb/backends/sql"
	"github.com/theduke/go-dukedb/backends/tests"
)

var _ = Describe("Mysql", func() {
	backend, _ := sql.New("mysql", "root@tcp(127.0.0.1:10002)/test?charset=utf8&parseTime=True&loc=Local")
	tests.TestBackend(backend)
})