File: gorethink_test.go

package info (click to toggle)
golang-gopkg-rethinkdb-rethinkdb-go.v6 6.2.1-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,736 kB
  • sloc: python: 1,382; makefile: 16; sh: 9
file content (28 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//go:generate ../gen_tests/gen_tests.sh

package reql_tests

import (
	"flag"
	"os"
	"runtime"

	r "gopkg.in/rethinkdb/rethinkdb-go.v6"
)

var url string

func init() {
	// Fixing test.testlogfile parsing error on Go 1.13+.
	if runtime.Version() < "go1.13" {
		flag.Parse()
	}

	r.SetVerbose(true)

	// If the test is being run by wercker look for the rethink url
	url = os.Getenv("RETHINKDB_URL")
	if url == "" {
		url = "localhost:28015"
	}
}