Skip to content

Commit

Permalink
Renamed start.ts to test.ts to match lint.ts and merge.ts. (#339
Browse files Browse the repository at this point in the history
)

* Renamed start to test for consistency.

Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Jun 12, 2024
1 parent 6601633 commit ecd4e41
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,20 @@ Tests are organized in folders that match [namespaces](spec/namespaces). For exa

### Running Spec Tests Locally

Set up an OpenSearch cluster with Docker using the default OPENSEARCH_PASSWORD (Recommended):
Set up an OpenSearch cluster with Docker using the default `OPENSEARCH_PASSWORD` (Recommended):
```bash
cd .github/opensearch-cluster
docker-compose up -d
```

Run the tests:
Run the tests (use `--opensearch-insecure` for a local cluster running in Docker that does not have a valid SSL certificate):
```bash
npm run test:spec
npm run test:spec -- --opensearch-insecure
```

Run a specific test story:
```bash
npm run test:spec -- --opensearch-insecure --tests tests/_core/info.yaml
```

If you opt to use a different password, you can set the `OPENSEARCH_PASSWORD` environment variable to the desired password before running `docker-compose up` and every time you run the tests:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"jest": "jest",
"test:unit": "jest --testMatch='**/*.test.ts' --testPathIgnorePatterns=/integ/",
"test:integ": "jest --testMatch='**/integ/*.test.ts' --runInBand",
"test:spec": "ts-node tools/src/tester/start.ts"
"test:spec": "ts-node tools/src/tester/test.ts"
},
"dependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { ChapterOutput } from 'tester/ChapterOutput'
import StoryEvaluator from 'tester/StoryEvaluator'

const spec = (args: string[]): any => {
const start = spawnSync('ts-node', ['tools/src/tester/start.ts'].concat(args), {
const start = spawnSync('ts-node', ['tools/src/tester/test.ts'].concat(args), {
env: { ...process.env, OPENSEARCH_PASSWORD: 'password' }
})
return {
Expand All @@ -26,7 +26,7 @@ const spec = (args: string[]): any => {
}

test('--help', () => {
expect(spec(['--help']).stdout).toContain('Usage: start [options]')
expect(spec(['--help']).stdout).toContain('Usage: test [options]')
})

test('--invalid', () => {
Expand Down

0 comments on commit ecd4e41

Please sign in to comment.