Temporal ephemeral server testing on airgapped environment

We don’t have access to the internet directly. I noticed when running my cloudbees dotnet build with tests using WorkflowEnvironment.StartLocalAsync():

Error Message:
System.InvalidOperationException : Connection failed: error sending request for url (https://temporal.download/cli/default?arch=amd64&platform=linux&format=tar.gz&sdk-name=sdk-dotnet&sdk-version=1.9.0.0)

Is there a way to configure the test setup e.g. enviornment variable or test configuration, to use a local executable? As we’re using Kubernetes builds I can bake the tar in to the image - if it checks it exists at a filepath before downloading, even better, that way I only have to update the container image.

Yes. Simply download the latest executable from Releases · temporalio/cli · GitHub and have it local somewhere, and in the options you pass to StartLocalAsync, set DevServerOptions.ExistingPath to the path of the executable. The default simply lazily downloads it and extracts it to the temp dir if this is not set and it doesn’t exist.

1 Like

Cheers thanks! Think it’s sussed

        await using var env = await WorkflowEnvironment.StartLocalAsync(
            new WorkflowEnvironmentStartLocalOptions
            {
                DevServerOptions = new DevServerOptions
                {
                    ExistingPath = @"/path-to-executable"
                }
            }
        );