Skip to content

Commit

Permalink
Use stable CLI for tests (#1637)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bergundy authored Sep 17, 2024
1 parent 592ae12 commit 03e0341
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ jobs:
- name: Docker compose - integration tests
if: ${{ matrix.testDockerCompose }}
run: go run . integration-test
env:
# TODO(bergundy): Remove this flag once server 1.25.0 is out.
DISABLE_NEXUS_TESTS: "1"
# TODO(bergundy): Remove this flag too once server 1.25.0 is out. Thanks Roey! :)
DISABLE_BACKLOG_STATS_TESTS: "1"
# TODO(cretz): Remove this flag once server 1.25.0 is out.
DISABLE_USER_METADATA_TESTS: "1"
working-directory: ./internal/cmd/build

cloud-test:
Expand Down Expand Up @@ -132,4 +125,4 @@ jobs:
with:
go-repo-path: ${{github.event.pull_request.head.repo.full_name}}
version: ${{github.event.pull_request.head.ref}}
version-is-repo-ref: true
version-is-repo-ref: true
6 changes: 5 additions & 1 deletion .github/workflows/docker/docker-compose.override.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
services:
temporal:
environment:
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/dynamic-config-custom.yaml
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/dynamic-config-custom.yaml
- FRONTEND_HTTP_PORT=7243
ports:
- 7233:7233
- 7243:7243
9 changes: 9 additions & 0 deletions .github/workflows/docker/dynamic-config-custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ worker.buildIdScavengerEnabled:
- value: true
worker.removableBuildIdDurationSinceDefault:
- value: 1
system.enableNexus:
- value: true
component.nexusoperations.callback.endpoint.template:
- value: http://localhost:7243/namespaces/{{.NamespaceName}}/nexus/callback
# SDK tests use arbitrary callback URLs, permit that on the server.
component.callbacks.allowedAddresses:
- value:
- Pattern: "*"
AllowInsecure: true
3 changes: 1 addition & 2 deletions internal/cmd/build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ func (b *builder) integrationTest() error {
HostPort: "127.0.0.1:7233",
Namespace: "integration-test-namespace",
},
// TODO(bergundy): Remove this override after server 1.25.0 is released.
CachedDownload: testsuite.CachedDownload{
Version: "v0.14.0-nexus.0",
Version: "v1.1.0",
},
LogLevel: "warn",
ExtraArgs: []string{
Expand Down
3 changes: 1 addition & 2 deletions test/nexus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"net/http"
"os"
"slices"
"strings"
"testing"
"time"

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

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

0 comments on commit 03e0341

Please sign in to comment.