Skip to content

Commit 51a8238

Browse files
authored
Merge pull request #3 from launchdarkly/eb/ch78731/modules
make this repo a module
2 parents f002ee1 + 3329f03 commit 51a8238

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+57
-21893
lines changed

.circleci/config.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,70 @@ workflows:
1515
- go-test:
1616
name: Go 1.12
1717
docker-image: circleci/golang:1.12
18+
with-modules: false
19+
work-dir: /go/src/github.com/launchdarkly/go-test-helpers
1820
- go-test:
1921
name: Go 1.11
2022
docker-image: circleci/golang:1.11
23+
with-modules: false
24+
work-dir: /go/src/github.com/launchdarkly/go-test-helpers
2125
- go-test:
2226
name: Go 1.10
2327
docker-image: circleci/golang:1.10
2428
run-lint: false # the version of golangci-lint we're using doesn't work with older Go versions
29+
with-modules: false
30+
work-dir: /go/src/github.com/launchdarkly/go-test-helpers
2531
- go-test:
2632
name: Go 1.9
2733
docker-image: circleci/golang:1.9
2834
run-lint: false # the version of golangci-lint we're using doesn't work with older Go versions
35+
with-modules: false
36+
work-dir: /go/src/github.com/launchdarkly/go-test-helpers
2937
- go-test:
3038
name: Go 1.8
3139
docker-image: circleci/golang:1.8
3240
run-lint: false # the version of golangci-lint we're using doesn't work with older Go versions
41+
with-modules: false
42+
work-dir: /go/src/github.com/launchdarkly/go-test-helpers
3343
- go-test-windows:
3444
name: Windows
3545

3646
jobs:
3747
go-test:
3848
parameters:
49+
docker-image:
50+
type: string
3951
run-lint:
4052
type: boolean
4153
default: true
42-
docker-image:
54+
with-modules:
55+
type: boolean
56+
default: true
57+
work-dir:
4358
type: string
59+
default: ~/project
4460

4561
docker:
4662
- image: <<parameters.docker-image>>
4763
environment:
4864
CIRCLE_TEST_REPORTS: /tmp/circle-reports
4965
CIRCLE_ARTIFACTS: /tmp/circle-artifacts
50-
COMMON_GO_PACKAGES: >
51-
github.com/jstemmer/go-junit-report
5266

53-
working_directory: /go/src/github.com/launchdarkly/go-test-helpers
67+
working_directory: <<parameters.work-dir>>
5468

5569
steps:
5670
- checkout
57-
- run: go get -u $COMMON_GO_PACKAGES
71+
- run:
72+
name: install go-junit-report
73+
command: go get -u github.com/jstemmer/go-junit-report
74+
75+
- unless:
76+
condition: <<parameters.with-modules>>
77+
steps:
78+
- run:
79+
name: get dependencies
80+
command: go get -t ./...
81+
5882
- when:
5983
condition: <<parameters.run-lint>>
6084
steps:
@@ -81,20 +105,11 @@ jobs:
81105

82106
environment:
83107
GOPATH: C:\Users\VssAdministrator\go
84-
PACKAGE_PATH: github.com/launchdarkly/go-test-helpers
85108

86109
steps:
87110
- checkout
88111
- run: go version
89-
- run:
90-
name: move source
91-
command: |
92-
go env GOPATH
93-
mkdir ${env:GOPATH}\src\${env:PACKAGE_PATH}
94-
mv * ${env:GOPATH}\src\${env:PACKAGE_PATH}
95112
- run:
96113
name: build and test
97114
command: |
98-
cd ${env:GOPATH}\src\${env:PACKAGE_PATH}
99-
go get -t ./...
100115
go test -race ./...

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ LINTER_VERSION_FILE=./bin/.golangci-lint-version-$(GOLANGCI_LINT_VERSION)
77
.PHONY: build clean test lint
88

99
build:
10-
go get ./...
1110
go build ./...
1211

1312
clean:
1413
go clean
1514

1615
test: build
17-
go get -t ./...
1816
@# Note, we need to specify all these packages individually for go test in order to remain 1.8-compatible
1917
go test -race -v . ./httphelpers ./ldservices
2018

go.mod

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module github.com/launchdarkly/go-test-helpers
2+
3+
go 1.13
4+
5+
require (
6+
github.com/davecgh/go-spew v1.1.1
7+
github.com/launchdarkly/eventsource v0.0.0-20190617224151-6b837031c9ca
8+
github.com/pmezard/go-difflib v1.0.0
9+
github.com/stretchr/testify v1.5.1
10+
gopkg.in/launchdarkly/go-sdk-common.v1 v1.0.0-20200204015611-d48d1b4f4e70
11+
gopkg.in/yaml.v2 v2.2.8
12+
)

go.sum

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2+
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
3+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4+
github.com/launchdarkly/eventsource v0.0.0-20190617224151-6b837031c9ca h1:0RzZ6zhhZtjksMG/uea93SH1PYItuHaxByioaEePUks=
5+
github.com/launchdarkly/eventsource v0.0.0-20190617224151-6b837031c9ca/go.mod h1:y6+/PY1Az/AQyjCMsFt5mOZq1tfM0/KOQRS4f0pVe3M=
6+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
8+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
9+
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
10+
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
11+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
12+
gopkg.in/launchdarkly/go-sdk-common.v1 v1.0.0-20200204015611-d48d1b4f4e70 h1:P1LaXpioVaqT2ltbaIsNBcigVLzj/7NEiOKzersfuEQ=
13+
gopkg.in/launchdarkly/go-sdk-common.v1 v1.0.0-20200204015611-d48d1b4f4e70/go.mod h1:2kE5FCTDQ53bqRSOfJpE5fdiAQYiN9LESONDNyEBFjI=
14+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
15+
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
16+
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

vendor/github.com/davecgh/go-spew/LICENSE

Lines changed: 0 additions & 15 deletions
This file was deleted.

vendor/github.com/davecgh/go-spew/spew/bypass.go

Lines changed: 0 additions & 145 deletions
This file was deleted.

vendor/github.com/davecgh/go-spew/spew/bypasssafe.go

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)