Skip to content

Commit 03e0341

Browse files
authoredSep 17, 2024··
Use stable CLI for tests (#1637)
Addressing a TODO I put in the code when working on Nexus while it wasn't available in a stable server / CLI release. Also: - Use dashes instead of underscores in the test endpoint names since that logic changed since the server RC was cut. - [Enable 1.25.0 tests with docker-compose](719c86a)
1 parent 592ae12 commit 03e0341

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed
 

‎.github/workflows/ci.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,6 @@ jobs:
8888
- name: Docker compose - integration tests
8989
if: ${{ matrix.testDockerCompose }}
9090
run: go run . integration-test
91-
env:
92-
# TODO(bergundy): Remove this flag once server 1.25.0 is out.
93-
DISABLE_NEXUS_TESTS: "1"
94-
# TODO(bergundy): Remove this flag too once server 1.25.0 is out. Thanks Roey! :)
95-
DISABLE_BACKLOG_STATS_TESTS: "1"
96-
# TODO(cretz): Remove this flag once server 1.25.0 is out.
97-
DISABLE_USER_METADATA_TESTS: "1"
9891
working-directory: ./internal/cmd/build
9992

10093
cloud-test:
@@ -132,4 +125,4 @@ jobs:
132125
with:
133126
go-repo-path: ${{github.event.pull_request.head.repo.full_name}}
134127
version: ${{github.event.pull_request.head.ref}}
135-
version-is-repo-ref: true
128+
version-is-repo-ref: true
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
services:
22
temporal:
33
environment:
4-
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/dynamic-config-custom.yaml
4+
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/dynamic-config-custom.yaml
5+
- FRONTEND_HTTP_PORT=7243
6+
ports:
7+
- 7233:7233
8+
- 7243:7243

‎.github/workflows/docker/dynamic-config-custom.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,12 @@ worker.buildIdScavengerEnabled:
2121
- value: true
2222
worker.removableBuildIdDurationSinceDefault:
2323
- value: 1
24+
system.enableNexus:
25+
- value: true
26+
component.nexusoperations.callback.endpoint.template:
27+
- value: http://localhost:7243/namespaces/{{.NamespaceName}}/nexus/callback
28+
# SDK tests use arbitrary callback URLs, permit that on the server.
29+
component.callbacks.allowedAddresses:
30+
- value:
31+
- Pattern: "*"
32+
AllowInsecure: true

‎internal/cmd/build/main.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ func (b *builder) integrationTest() error {
140140
HostPort: "127.0.0.1:7233",
141141
Namespace: "integration-test-namespace",
142142
},
143-
// TODO(bergundy): Remove this override after server 1.25.0 is released.
144143
CachedDownload: testsuite.CachedDownload{
145-
Version: "v0.14.0-nexus.0",
144+
Version: "v1.1.0",
146145
},
147146
LogLevel: "warn",
148147
ExtraArgs: []string{

‎test/nexus_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"net/http"
3030
"os"
3131
"slices"
32-
"strings"
3332
"testing"
3433
"time"
3534

@@ -77,7 +76,7 @@ func newTestContext(t *testing.T, ctx context.Context) *testContext {
7776
require.NoError(t, err)
7877

7978
taskQueue := "sdk-go-nexus-test-tq-" + uuid.NewString()
80-
endpoint := strings.ReplaceAll("sdk-go-nexus-test-ep-"+uuid.NewString(), "-", "_")
79+
endpoint := "sdk-go-nexus-test-ep-" + uuid.NewString()
8180
res, err := c.OperatorService().CreateNexusEndpoint(ctx, &operatorservice.CreateNexusEndpointRequest{
8281
Spec: &nexuspb.EndpointSpec{
8382
Name: endpoint,

0 commit comments

Comments
 (0)
Please sign in to comment.