Skip to content

Commit

Permalink
test: update retry conf test data (#2190)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tritone committed May 4, 2023
1 parent 820b19a commit 5a53804
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 17 deletions.
5 changes: 3 additions & 2 deletions conformance-test/scenarios/scenarioFive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions conformance-test/scenarios/scenarioFour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions conformance-test/scenarios/scenarioOne.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions conformance-test/scenarios/scenarioSeven.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions conformance-test/scenarios/scenarioSix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions conformance-test/scenarios/scenarioThree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions conformance-test/scenarios/scenarioTwo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 6 additions & 3 deletions conformance-test/test-data/retryStrategyTestData.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"retryStrategyTests": [
"retryTests": [
{
"id": 1,
"description": "always_idempotent",
Expand Down Expand Up @@ -130,7 +130,7 @@
},
{
"id": 5,
"description": "non_retryable_errors",
"description": "non-retryable errors",
"cases": [
{
"instructions": ["return-400"]
Expand Down Expand Up @@ -247,6 +247,9 @@
{
"instructions": ["return-reset-connection", "return-503"]
},
{
"instructions": ["return-408"]
},
{
"instructions": ["return-503-after-256K"]
},
Expand All @@ -261,4 +264,4 @@
"expectSuccess": true
}
]
}
}

0 comments on commit 5a53804

Please sign in to comment.