balena-supervisor/test/unit
Christina Ying Wang eaa07e97a9 Add support for redsocks dnsu2t config
Users may specify dnsu2t config by including a `dns` field
in the `proxy` section of PATCH /v1/device/host-config's body:
```
{
  network: {
    proxy: {
      dns: '1.1.1.1:53',
    }
  }
}
```

If `dns` is a string, ADDRESS and PORT are required and should be
in the format `ADDRESS:PORT`. The endpoint with error with
code 400 if either ADDRESS or PORT are missing.

`dns` may also be a boolean. If true, defaults will be configured.
If false, the dns configuration will be removed.

If `proxy` is patched to empty, `dns` will be removed regardless
of its current or input configs, as `dns` depends on an active
redsocks proxy to function.

Change-type: minor
Signed-off-by: Christina Ying Wang <christina@balena.io>
2024-08-28 14:01:51 -07:00
..
compose Create replicating test 2024-06-24 15:54:19 -04:00
config Update @balena/lint to v7 2024-03-01 18:27:30 -03:00
device-api Verify that LED_FILE exists on blinking setup 2024-08-07 15:33:07 -04:00
lib Move lib/fs-utils tests to testfs 2024-04-24 13:37:45 -07:00
.mocharc.js Disable logs globally using mocha hooks 2022-09-28 10:37:41 -03:00
device-state.spec.ts Add unit test for usingInferStepsLock 2024-08-26 13:44:51 -07:00
host-config.spec.ts Add support for redsocks dnsu2t config 2024-08-28 14:01:51 -07:00
memory.spec.ts Add memory usage healthcheck 2024-04-11 18:16:47 -07:00
network.spec.ts Update typescript to v5 2024-03-05 15:33:56 -03:00
types.spec.ts Fix withDefault type helper to work with boolean 2022-09-13 20:08:32 +00:00