This repository was archived by the owner on May 19, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-16
lines changed Expand file tree Collapse file tree 4 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,14 @@ version: 2
2
2
jobs :
3
3
build :
4
4
docker :
5
- - image : circleci/golang:1.11
5
+ - image : circleci/golang:1.12
6
6
parallelism : 4
7
7
8
8
# directory where steps are run. Path must conform to the Go Workspace requirements
9
9
working_directory : /go/src/github.com/microparts/configuration-golang
10
10
11
11
environment : # environment variables for the build itself
12
12
- IN_CONTAINER : true
13
- - DEP_VERSION : 0.5.0
14
13
- GOCACHE : /tmp/go/cache
15
14
- TEST_RESULTS : /tmp/test-results # path to where test results will be saved
16
15
22
21
command : |
23
22
sudo apt-get update
24
23
sudo apt-get install make
25
- sudo curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o /bin/dep
26
- sudo chmod +x /bin/dep
27
24
make deps
28
25
go get github.com/jstemmer/go-junit-report
29
26
- run :
Original file line number Diff line number Diff line change 1
1
# Dockerfile for test image
2
- FROM golang:alpine as build-env
2
+ FROM golang:1.12.1- alpine as build-env
3
3
MAINTAINER Sergey Gladkovskiy <smgladkovskiy@gmail.com>
4
4
5
- ARG DEP_VERSION="0.5.0"
6
- ENV IN_CONTAINER="true"
5
+ ENV GO111MODULE=on
7
6
8
7
RUN apk update \
9
8
&& apk add --no-cache \
10
- ca-certificates \
11
9
curl \
12
10
git \
13
11
make \
14
- openssl \
15
12
openssh-client \
16
- gcc \
17
- musl-dev \
18
- && curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o /bin/dep \
19
- && chmod +x /bin/dep \
20
13
&& rm -rf /var/cache/apk/* \
21
14
&& rm -rf /tmp/*
22
15
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ IMAGE = golang-pkg-test
2
2
TEST_CONTAINER = docker run --rm -i --name golang-config $(IMAGE )
3
3
4
4
deps : # # Get the dependencies
5
- @dep ensure
5
+ @go mod vendor
6
6
7
7
race : # # Run data race detector
8
8
@go test -race ./...
Original file line number Diff line number Diff line change 1
1
package config
2
2
3
3
import (
4
+ "testing"
5
+
4
6
"github.com/stretchr/testify/assert"
5
7
"gopkg.in/yaml.v2"
6
- "testing"
7
8
)
8
9
9
10
func TestReadConfigs (t * testing.T ) {
@@ -81,7 +82,7 @@ func TestReadConfigs(t *testing.T) {
81
82
Username : "TESt_USERNAME" ,
82
83
Password : "PASSWORD" ,
83
84
},
84
- DefaultList : []string {"foo" , " bar" , "baz" },
85
+ DefaultList : []string {"bar" , "baz" },
85
86
Logging : "info" ,
86
87
Databases : struct {
87
88
Redis struct {
You can’t perform that action at this time.
0 commit comments