Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Nov 13, 2024
1 parent 0d47bfe commit 94c72f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 10 additions & 0 deletions docs/service_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,14 @@ This means the SDK supports setting the wrapper name and version and includes th

When this capability is set a `wrapper` configuration will be included with a subset of tests.


### Capability `"http-proxy"`

This indicates the SDK is capable of configuring an HTTP proxy for its network requests.

All requests should be sent to the proxy. This is generally implemented in an SDK via standard networking
library capabilities, such as setting an environment variable (like `http_proxy`) or a configuration option.

### Stop test service: `DELETE /`

The test harness sends this request at the end of a test run if you have specified `--stop-service-at-end` on the [command line](./running.md). The test service should simply quit. This is a convenience so CI scripts can simply start the test service in the background and assume it will be stopped for them.
Expand Down Expand Up @@ -291,6 +299,8 @@ A `POST` request indicates that the test harness wants to start an instance of t
* `wrapper` (object, optional): If specified contains wrapper configuration.
* `name`: The name of the wrapper.
* `version`: The version of the wrapper.
* `proxy` (object, optional): If specified contains proxy configuration.
* `httpProxy` (string, optional): An HTTP proxy, of the form `http://host:port`.

The response to a valid request is any HTTP `2xx` status, with a `Location` header whose value is the URL of the test service resource representing this SDK client instance (that is, the one that would be used for "Close client" or "Send command" as described below).

Expand Down
1 change: 0 additions & 1 deletion sdktests/testapi_sdk_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ func validateSDKConfig(config servicedef.SDKConfigParams) error {
return errors.New(
"neither streaming nor polling was enabled-- did you forget to include the SDKDataSource as a parameter?")
}

if config.Streaming.IsDefined() && config.Streaming.Value().BaseURI == "" &&
(!config.ServiceEndpoints.IsDefined() || config.ServiceEndpoints.Value().Streaming == "") {
return errors.New("streaming was enabled but base URI was not set")
Expand Down
3 changes: 1 addition & 2 deletions servicedef/service_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ const (
CapabilityWrapper = "wrapper"

// CapabilityHttpProxy indicates that the SDK supports setting an HTTP proxy, through which the SDK will
// make all requests. In this paradigm, the SDK communicates with the proxy over HTTP (no TLS) and the proxy
// then communicates with LaunchDarkly with TLS (or with Relay, which may or may not have TLS enabled.)
// make all requests.
CapabilityHttpProxy = "http-proxy"

Check failure on line 70 in servicedef/service_params.go

View workflow job for this annotation

GitHub Actions / build-and-test

ST1003: const CapabilityHttpProxy should be CapabilityHTTPProxy (stylecheck)
)

Expand Down

0 comments on commit 94c72f4

Please sign in to comment.