コード例 #1
0
ファイル: postgres_test.go プロジェクト: theduke/go-dukedb
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)
})
コード例 #2
0
ファイル: memory_test.go プロジェクト: theduke/go-dukedb
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
	})
})
コード例 #3
0
ファイル: mysql_test.go プロジェクト: theduke/go-dukedb
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)
})