mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
ci: swap freeport for portal in packages (#15661)
This commit is contained in:
@@ -14,12 +14,11 @@ Each unit test should meet a few criteria:
|
||||
- Undo any changes to the environment
|
||||
- Set environment variables must be unset (use `t.Setenv`)
|
||||
- Scratch files/dirs must be removed (use `t.TempDir`)
|
||||
- Consumed ports must be freed (e.g. `TestServer.Cleanup`, `freeport.Return`)
|
||||
|
||||
- Able to run in parallel
|
||||
- All package level `Test*` functions should start with `ci.Parallel`
|
||||
- Always use dynamic scratch dirs, files
|
||||
- Always get ports from helpers (`TestServer`, `TestClient`, `TestAgent`, `freeport.Get`)
|
||||
- Always get ports via `ci.PortAllocator.Grab()`
|
||||
|
||||
- Log control
|
||||
- Logging must go through the `testing.T` (use `helper/testlog.HCLogger`)
|
||||
|
||||
Reference in New Issue
Block a user