Skip to content

Commit f42871b

Browse files
authored
Allow for custom entries to the OctopusContainer environment (#5)
When constructing an OctopusContainerTest, clients can set the `CustomEnvironment` field to inject extra/new values into the env in which OctopusServer will be running. These inject values will not override the default environment required to start the container eg ACCEPT_EULA.
1 parent 2f1dc3f commit f42871b

File tree

5 files changed

+226
-173
lines changed

5 files changed

+226
-173
lines changed

.github/workflows/pr_checks.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: OctopusTerraformTestFramework
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Setup Go
12+
uses: actions/setup-go@v5
13+
with:
14+
go-version: '1.21.x'
15+
- name: Install dependencies
16+
run: go get ./...
17+
- name: Build
18+
run: go build -v ./...
19+
- name: Test
20+
run: go test ./...
21+

go.mod

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,52 @@ require (
99
github.com/avast/retry-go/v4 v4.5.1
1010
github.com/google/uuid v1.6.0
1111
github.com/otiai10/copy v1.14.0
12-
github.com/testcontainers/testcontainers-go v0.31.0
12+
github.com/testcontainers/testcontainers-go v0.32.0
1313
github.com/wk8/go-ordered-map/v2 v2.1.8
1414
)
1515

1616
require (
1717
dario.cat/mergo v1.0.0 // indirect
18-
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
19-
github.com/Microsoft/go-winio v0.6.1 // indirect
20-
github.com/Microsoft/hcsshim v0.11.4 // indirect
18+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
19+
github.com/Microsoft/go-winio v0.6.2 // indirect
20+
github.com/Microsoft/hcsshim v0.11.5 // indirect
2121
github.com/bahlo/generic-list-go v0.2.0 // indirect
2222
github.com/buger/jsonparser v1.1.1 // indirect
2323
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
24-
github.com/containerd/containerd v1.7.15 // indirect
24+
github.com/containerd/containerd v1.7.18 // indirect
25+
github.com/containerd/errdefs v0.1.0 // indirect
2526
github.com/containerd/log v0.1.0 // indirect
2627
github.com/cpuguy83/dockercfg v0.3.1 // indirect
2728
github.com/davecgh/go-spew v1.1.1 // indirect
2829
github.com/dghubble/sling v1.4.1 // indirect
29-
github.com/docker/distribution v2.8.2+incompatible // indirect
30-
github.com/docker/docker v25.0.5+incompatible // indirect
30+
github.com/distribution/reference v0.6.0 // indirect
31+
github.com/docker/docker v27.0.3+incompatible // indirect
3132
github.com/docker/go-connections v0.5.0 // indirect
3233
github.com/docker/go-units v0.5.0 // indirect
34+
github.com/felixge/httpsnoop v1.0.4 // indirect
35+
github.com/go-logr/logr v1.4.1 // indirect
36+
github.com/go-logr/stdr v1.2.2 // indirect
3337
github.com/go-ole/go-ole v1.2.6 // indirect
3438
github.com/go-playground/locales v0.14.1 // indirect
3539
github.com/go-playground/universal-translator v0.18.1 // indirect
3640
github.com/go-playground/validator/v10 v10.11.2 // indirect
3741
github.com/gogo/protobuf v1.3.2 // indirect
3842
github.com/golang/protobuf v1.5.4 // indirect
3943
github.com/google/go-querystring v1.1.0 // indirect
40-
github.com/klauspost/compress v1.16.0 // indirect
41-
github.com/leodido/go-urn v1.2.2 // indirect
44+
github.com/klauspost/compress v1.17.4 // indirect
45+
github.com/kr/text v0.2.0 // indirect
46+
github.com/leodido/go-urn v1.2.1 // indirect
4247
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
4348
github.com/magiconair/properties v1.8.7 // indirect
4449
github.com/mailru/easyjson v0.7.7 // indirect
50+
github.com/moby/docker-image-spec v1.3.1 // indirect
4551
github.com/moby/patternmatcher v0.6.0 // indirect
4652
github.com/moby/sys/sequential v0.5.0 // indirect
53+
github.com/moby/sys/user v0.1.0 // indirect
4754
github.com/moby/term v0.5.0 // indirect
4855
github.com/morikuni/aec v1.0.0 // indirect
4956
github.com/opencontainers/go-digest v1.0.0 // indirect
5057
github.com/opencontainers/image-spec v1.1.0 // indirect
51-
github.com/opencontainers/runc v1.1.5 // indirect
5258
github.com/pkg/errors v0.9.1 // indirect
5359
github.com/pmezard/go-difflib v1.0.0 // indirect
5460
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
@@ -59,33 +65,17 @@ require (
5965
github.com/tklauser/go-sysconf v0.3.12 // indirect
6066
github.com/tklauser/numcpus v0.6.1 // indirect
6167
github.com/yusufpapurcu/wmi v1.2.3 // indirect
68+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
69+
go.opentelemetry.io/otel v1.24.0 // indirect
70+
go.opentelemetry.io/otel/metric v1.24.0 // indirect
71+
go.opentelemetry.io/otel/trace v1.24.0 // indirect
6272
golang.org/x/crypto v0.22.0 // indirect
63-
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
64-
golang.org/x/mod v0.16.0 // indirect
65-
golang.org/x/net v0.21.0 // indirect
73+
golang.org/x/exp v0.0.0-20230129154200-a960b3787bd2 // indirect
6674
golang.org/x/sync v0.3.0 // indirect
6775
golang.org/x/sys v0.19.0 // indirect
6876
golang.org/x/text v0.14.0 // indirect
69-
golang.org/x/tools v0.13.0 // indirect
70-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect
71-
google.golang.org/grpc v1.58.3 // indirect
77+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
78+
google.golang.org/grpc v1.59.0 // indirect
7279
google.golang.org/protobuf v1.33.0 // indirect
7380
gopkg.in/yaml.v3 v3.0.1 // indirect
7481
)
75-
76-
replace (
77-
github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible // 22.06 master branch
78-
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch
79-
github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a // same as buildx
80-
81-
github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2 // Can be removed on next bump of containerd to > 1.6.4
82-
83-
// For k8s dependencies, we use a replace directive, to prevent them being
84-
// upgraded to the version specified in containerd, which is not relevant to the
85-
// version needed.
86-
// See https://github.com/docker/buildx/pull/948 for details.
87-
// https://github.com/docker/buildx/blob/v0.8.1/go.mod#L62-L64
88-
k8s.io/api => k8s.io/api v0.22.4
89-
k8s.io/apimachinery => k8s.io/apimachinery v0.22.4
90-
k8s.io/client-go => k8s.io/client-go v0.22.4
91-
)

0 commit comments

Comments
 (0)