-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: dblock <[email protected]>
- Loading branch information
Showing
19 changed files
with
70 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
import { create_shared_resources, load_actual_evaluation, load_expected_evaluation } from './helpers' | ||
import { read_yaml } from '../../helpers' | ||
import { type OpenAPIV3 } from 'openapi-types' | ||
|
||
describe('Story Evaluator', () => { | ||
beforeAll(() => { | ||
const spec = read_yaml('tools/integ_tests/tester/fixtures/specs/indices_excerpt.yaml') | ||
create_shared_resources(spec as OpenAPIV3.Document) | ||
}) | ||
|
||
test('passed', async () => { | ||
const actual = await load_actual_evaluation('passed') | ||
const expected = await load_expected_evaluation('passed') | ||
expect(actual).toEqual(expected) | ||
}) | ||
|
||
test('skipped', async () => { | ||
const actual = await load_actual_evaluation('skipped') | ||
const expected = await load_expected_evaluation('skipped') | ||
expect(actual).toEqual(expected) | ||
}) | ||
|
||
test('failed/not_found', async () => { | ||
const actual = await load_actual_evaluation('failed/not_found') | ||
const expected = await load_expected_evaluation('failed/not_found') | ||
expect(actual).toEqual(expected) | ||
}) | ||
|
||
test('failed/invalid_data', async () => { | ||
const actual = await load_actual_evaluation('failed/invalid_data') | ||
const expected = await load_expected_evaluation('failed/invalid_data') | ||
expect(actual).toEqual(expected) | ||
}) | ||
|
||
test('error/prologue_error', async () => { | ||
const actual = await load_actual_evaluation('error/prologue_error') | ||
const expected = await load_expected_evaluation('error/prologue_error') | ||
expect(actual).toEqual(expected) | ||
}) | ||
|
||
test('error/chapter_error', async () => { | ||
const actual = await load_actual_evaluation('error/chapter_error') | ||
const expected = await load_expected_evaluation('error/chapter_error') | ||
expect(actual).toEqual(expected) | ||
}) | ||
}) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...r/fixtures/evals/error/chapter_error.yaml → ...r/fixtures/evals/error/chapter_error.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../fixtures/evals/error/prologue_error.yaml → .../fixtures/evals/error/prologue_error.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...r/fixtures/evals/failed/invalid_data.yaml → ...r/fixtures/evals/failed/invalid_data.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ster/fixtures/evals/failed/not_found.yaml → ...ster/fixtures/evals/failed/not_found.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/tests/tester/fixtures/evals/passed.yaml → ...g_tests/tester/fixtures/evals/passed.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../tests/tester/fixtures/evals/skipped.yaml → ..._tests/tester/fixtures/evals/skipped.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.