Skip to content

Commit e301432

Browse files
fix: add retries to network tests (#2055)
## Description Network tests, specifically the [Remote Cidr Restriction](https://github.com/defenseunicorns/uds-core/blob/988955bba84e5fa997b316e105d7a661e081992b/test/vitest/network.spec.ts#L393-L411) and other tests that utilize a [curl that verifies response from google](https://github.com/defenseunicorns/uds-core/blob/988955bba84e5fa997b316e105d7a661e081992b/test/vitest/network.spec.ts#L173-L183) are very flaky lately. This PR increases timeout of the curl command to 20 seconds, increases number of retries to 3, and adds a retry delay of 1 second between retries. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md) followed
1 parent 5e93bf0 commit e301432

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/vitest/network.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ describe("Network Policy Validation", () => {
174174
"curl",
175175
"-s",
176176
"-m",
177+
"20",
178+
"--retry",
177179
"3",
180+
"--retry-delay",
181+
"1",
178182
"-o",
179183
"/dev/null",
180184
"-w",

0 commit comments

Comments
 (0)