Skip to content

nat: assorted test cleanups and improvements#129

Merged
thaJeztah merged 4 commits intodocker:masterfrom
thaJeztah:cleanup_tests
May 29, 2025
Merged

nat: assorted test cleanups and improvements#129
thaJeztah merged 4 commits intodocker:masterfrom
thaJeztah:cleanup_tests

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

see individual commits for details

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah thaJeztah requested a review from robmry May 29, 2025 13:10
doc: "zero range",
input: "0-0",
},
// invalid cases
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not important, but the original tests had "8000-a" and "8000-30a" ... maybe trying to catch the parser reading the "30" and ignoring the "a" - but that'd still be an invalid range. So, could add "8000-8000a"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, can do; let me add that.

Some of those possibly also originated from my PHP days where "looks numeric" would sometimes be happily converted (hex values etc) 😂

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added cases for those, and adjusted 8000/9000 to be less ambiguous on "what's wrong"

Copy link
Copy Markdown
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you!

thaJeztah added 4 commits May 29, 2025 15:31
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
ParsePortRangeToInt is a shallow wrapper around ParsePortRange,
except for returning int's, and accepting empty values. Other
cases are covered by TestParsePortRange.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah merged commit db5a644 into docker:master May 29, 2025
13 checks passed
@thaJeztah thaJeztah deleted the cleanup_tests branch May 29, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants