Skip to content
This repository was archived by the owner on May 19, 2020. It is now read-only.

Commit 39246c2

Browse files
committed
Correction for tests for case with merging slices with override. go.mod fixes
1 parent f7661cb commit 39246c2

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

.circleci/config.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/golang:1.11
5+
- image: circleci/golang:1.12
66
parallelism: 4
77

88
# directory where steps are run. Path must conform to the Go Workspace requirements
99
working_directory: /go/src/github.com/microparts/configuration-golang
1010

1111
environment: # environment variables for the build itself
1212
- IN_CONTAINER: true
13-
- DEP_VERSION: 0.5.0
1413
- GOCACHE: /tmp/go/cache
1514
- TEST_RESULTS: /tmp/test-results # path to where test results will be saved
1615

@@ -22,8 +21,6 @@ jobs:
2221
command: |
2322
sudo apt-get update
2423
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
2724
make deps
2825
go get github.com/jstemmer/go-junit-report
2926
- run:

Dockerfile

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
# Dockerfile for test image
2-
FROM golang:alpine as build-env
2+
FROM golang:1.12.1-alpine as build-env
33
MAINTAINER Sergey Gladkovskiy <[email protected]>
44

5-
ARG DEP_VERSION="0.5.0"
6-
ENV IN_CONTAINER="true"
5+
ENV GO111MODULE=on
76

87
RUN apk update \
98
&& apk add --no-cache \
10-
ca-certificates \
119
curl \
1210
git \
1311
make \
14-
openssl \
1512
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 \
2013
&& rm -rf /var/cache/apk/* \
2114
&& rm -rf /tmp/*
2215

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ IMAGE = golang-pkg-test
22
TEST_CONTAINER = docker run --rm -i --name golang-config $(IMAGE)
33

44
deps: ## Get the dependencies
5-
@dep ensure
5+
@go mod vendor
66

77
race: ## Run data race detector
88
@go test -race ./...

reader_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package config
22

33
import (
4+
"testing"
5+
46
"github.com/stretchr/testify/assert"
57
"gopkg.in/yaml.v2"
6-
"testing"
78
)
89

910
func TestReadConfigs(t *testing.T) {
@@ -81,7 +82,7 @@ func TestReadConfigs(t *testing.T) {
8182
Username: "TESt_USERNAME",
8283
Password: "PASSWORD",
8384
},
84-
DefaultList: []string{"foo", "bar", "baz"},
85+
DefaultList: []string{"bar", "baz"},
8586
Logging: "info",
8687
Databases: struct {
8788
Redis struct {

0 commit comments

Comments
 (0)