Skip to content

Commit

Permalink
test(cmd-api-server): randomize port in config service test
Browse files Browse the repository at this point in the history
If you don't specify port zero for the API and the cockpit then they
will default to 3000 and 4000 instead which is bad for
parallel test execution where we need guarantees not to
use potentially conflicting port numbers.

Signed-off-by: Peter Somogyvari <[email protected]>
  • Loading branch information
petermetz committed Aug 12, 2021
1 parent ce076d7 commit 3d68fe3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ test("Generates valid example config for the API server", async (t: Test) => {
) as unknown) as IAuthorizationConfig;

exampleConfig.configFile = "";
exampleConfig.apiPort = 0;
exampleConfig.cockpitPort = 0;

const convictConfig = configService.newExampleConfigConvict(exampleConfig);
t.ok(convictConfig, "configService.newExampleConfigConvict() truthy OK");
Expand Down

0 comments on commit 3d68fe3

Please sign in to comment.