From 5a53804bcd86866a7e999343a3417bfbf423fac8 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Thu, 4 May 2023 13:29:31 -0400 Subject: [PATCH] test: update retry conf test data (#2190) * test: update retry conf test data Copies the retry_test json from the latest in the conformance test repo. Rename retryStrategyTest to retryTest for consistency, and add 408 errors for upload tests. S8 is still not implemented in node so that part is skipped. * remove one 408 case * fix lint * fix lint --- conformance-test/scenarios/scenarioFive.ts | 5 +++-- conformance-test/scenarios/scenarioFour.ts | 5 +++-- conformance-test/scenarios/scenarioOne.ts | 5 +++-- conformance-test/scenarios/scenarioSeven.ts | 5 +++-- conformance-test/scenarios/scenarioSix.ts | 5 +++-- conformance-test/scenarios/scenarioThree.ts | 5 +++-- conformance-test/scenarios/scenarioTwo.ts | 5 +++-- conformance-test/test-data/retryStrategyTestData.json | 9 ++++++--- 8 files changed, 27 insertions(+), 17 deletions(-) diff --git a/conformance-test/scenarios/scenarioFive.ts b/conformance-test/scenarios/scenarioFive.ts index be4f9655d..91f2940d1 100644 --- a/conformance-test/scenarios/scenarioFive.ts +++ b/conformance-test/scenarios/scenarioFive.ts @@ -18,8 +18,9 @@ import {executeScenario, RetryTestCase} from '../conformanceCommon'; import * as assert from 'assert'; const SCENARIO_NUMBER_TO_TEST = 5; -const retryTestCase: RetryTestCase | undefined = - testFile.retryStrategyTests.find(test => test.id === SCENARIO_NUMBER_TO_TEST); +const retryTestCase: RetryTestCase | undefined = testFile.retryTests.find( + test => test.id === SCENARIO_NUMBER_TO_TEST +); describe(`Scenario ${SCENARIO_NUMBER_TO_TEST}`, () => { assert(retryTestCase); diff --git a/conformance-test/scenarios/scenarioFour.ts b/conformance-test/scenarios/scenarioFour.ts index 684e6c92d..ed8ca2b5a 100644 --- a/conformance-test/scenarios/scenarioFour.ts +++ b/conformance-test/scenarios/scenarioFour.ts @@ -18,8 +18,9 @@ import {executeScenario, RetryTestCase} from '../conformanceCommon'; import * as assert from 'assert'; const SCENARIO_NUMBER_TO_TEST = 4; -const retryTestCase: RetryTestCase | undefined = - testFile.retryStrategyTests.find(test => test.id === SCENARIO_NUMBER_TO_TEST); +const retryTestCase: RetryTestCase | undefined = testFile.retryTests.find( + test => test.id === SCENARIO_NUMBER_TO_TEST +); describe(`Scenario ${SCENARIO_NUMBER_TO_TEST}`, () => { assert(retryTestCase); diff --git a/conformance-test/scenarios/scenarioOne.ts b/conformance-test/scenarios/scenarioOne.ts index 5d45bbed7..2a61f5995 100644 --- a/conformance-test/scenarios/scenarioOne.ts +++ b/conformance-test/scenarios/scenarioOne.ts @@ -18,8 +18,9 @@ import {executeScenario, RetryTestCase} from '../conformanceCommon'; import * as assert from 'assert'; const SCENARIO_NUMBER_TO_TEST = 1; -const retryTestCase: RetryTestCase | undefined = - testFile.retryStrategyTests.find(test => test.id === SCENARIO_NUMBER_TO_TEST); +const retryTestCase: RetryTestCase | undefined = testFile.retryTests.find( + test => test.id === SCENARIO_NUMBER_TO_TEST +); describe(`Scenario ${SCENARIO_NUMBER_TO_TEST}`, () => { assert(retryTestCase); diff --git a/conformance-test/scenarios/scenarioSeven.ts b/conformance-test/scenarios/scenarioSeven.ts index aaf6ed573..fd73e41da 100644 --- a/conformance-test/scenarios/scenarioSeven.ts +++ b/conformance-test/scenarios/scenarioSeven.ts @@ -18,8 +18,9 @@ import {executeScenario, RetryTestCase} from '../conformanceCommon'; import * as assert from 'assert'; const SCENARIO_NUMBER_TO_TEST = 7; -const retryTestCase: RetryTestCase | undefined = - testFile.retryStrategyTests.find(test => test.id === SCENARIO_NUMBER_TO_TEST); +const retryTestCase: RetryTestCase | undefined = testFile.retryTests.find( + test => test.id === SCENARIO_NUMBER_TO_TEST +); describe(`Scenario ${SCENARIO_NUMBER_TO_TEST}`, () => { assert(retryTestCase); diff --git a/conformance-test/scenarios/scenarioSix.ts b/conformance-test/scenarios/scenarioSix.ts index 6ed5ee761..b88ae1927 100644 --- a/conformance-test/scenarios/scenarioSix.ts +++ b/conformance-test/scenarios/scenarioSix.ts @@ -18,8 +18,9 @@ import {executeScenario, RetryTestCase} from '../conformanceCommon'; import * as assert from 'assert'; const SCENARIO_NUMBER_TO_TEST = 6; -const retryTestCase: RetryTestCase | undefined = - testFile.retryStrategyTests.find(test => test.id === SCENARIO_NUMBER_TO_TEST); +const retryTestCase: RetryTestCase | undefined = testFile.retryTests.find( + test => test.id === SCENARIO_NUMBER_TO_TEST +); describe(`Scenario ${SCENARIO_NUMBER_TO_TEST}`, () => { assert(retryTestCase); diff --git a/conformance-test/scenarios/scenarioThree.ts b/conformance-test/scenarios/scenarioThree.ts index 4d3ab3569..a5fb08beb 100644 --- a/conformance-test/scenarios/scenarioThree.ts +++ b/conformance-test/scenarios/scenarioThree.ts @@ -18,8 +18,9 @@ import {executeScenario, RetryTestCase} from '../conformanceCommon'; import * as assert from 'assert'; const SCENARIO_NUMBER_TO_TEST = 3; -const retryTestCase: RetryTestCase | undefined = - testFile.retryStrategyTests.find(test => test.id === SCENARIO_NUMBER_TO_TEST); +const retryTestCase: RetryTestCase | undefined = testFile.retryTests.find( + test => test.id === SCENARIO_NUMBER_TO_TEST +); describe(`Scenario ${SCENARIO_NUMBER_TO_TEST}`, () => { assert(retryTestCase); diff --git a/conformance-test/scenarios/scenarioTwo.ts b/conformance-test/scenarios/scenarioTwo.ts index 063b8419d..f86035f50 100644 --- a/conformance-test/scenarios/scenarioTwo.ts +++ b/conformance-test/scenarios/scenarioTwo.ts @@ -18,8 +18,9 @@ import {executeScenario, RetryTestCase} from '../conformanceCommon'; import * as assert from 'assert'; const SCENARIO_NUMBER_TO_TEST = 2; -const retryTestCase: RetryTestCase | undefined = - testFile.retryStrategyTests.find(test => test.id === SCENARIO_NUMBER_TO_TEST); +const retryTestCase: RetryTestCase | undefined = testFile.retryTests.find( + test => test.id === SCENARIO_NUMBER_TO_TEST +); describe(`Scenario ${SCENARIO_NUMBER_TO_TEST}`, () => { assert(retryTestCase); diff --git a/conformance-test/test-data/retryStrategyTestData.json b/conformance-test/test-data/retryStrategyTestData.json index c8460d6b3..b302c0072 100644 --- a/conformance-test/test-data/retryStrategyTestData.json +++ b/conformance-test/test-data/retryStrategyTestData.json @@ -1,5 +1,5 @@ { - "retryStrategyTests": [ + "retryTests": [ { "id": 1, "description": "always_idempotent", @@ -130,7 +130,7 @@ }, { "id": 5, - "description": "non_retryable_errors", + "description": "non-retryable errors", "cases": [ { "instructions": ["return-400"] @@ -247,6 +247,9 @@ { "instructions": ["return-reset-connection", "return-503"] }, + { + "instructions": ["return-408"] + }, { "instructions": ["return-503-after-256K"] }, @@ -261,4 +264,4 @@ "expectSuccess": true } ] -} \ No newline at end of file +}