Prepare repository merge

This commit is contained in:
Noah Hilverling 2019-05-13 14:40:51 +02:00
parent b0ce152219
commit 9a5136190f
15 changed files with 41 additions and 11 deletions

View file

30
connection/.gitlab-ci.yml Normal file
View file

@ -0,0 +1,30 @@
image: golang:latest
variables:
REPO_NAME: git.icinga.com/icingadb/icingadb-connection
before_script:
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
- cd $GOPATH/src/$REPO_NAME
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@git.icinga.com/".insteadOf "https://git.icinga.com/"
- go get -t ./...
stages:
- test
- coverage
test:
stage: test
script:
- go fmt $(go list ./... | grep -v /vendor/)
- go vet $(go list ./... | grep -v /vendor/)
- go test -race $(go list ./... | grep -v /vendor/) -cover
coverage:
stage: coverage
script:
- ./coverage.sh
artifacts:
paths:
- coverage.html

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"container/list"

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"context"

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"database/sql"
@ -40,7 +40,7 @@ func mkMysql(dbType string, dbDsn string) (*sql.DB, error) {
mysql.SetLogger(oldlog.New(ioutil.Discard, "", 0))
db.SetMaxOpenConns(100)
db.SetMaxOpenConns(50)
db.SetMaxIdleConns(0)
return db, nil

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"errors"

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"github.com/prometheus/client_golang/prometheus"

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"fmt"

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import "github.com/go-redis/redis"

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"github.com/go-redis/redis"

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"github.com/go-redis/redis"

View file

@ -1,4 +1,4 @@
package icingadb_connection
package connection
import (
"github.com/go-redis/redis"