Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to op test harness #3673

Merged
merged 4 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,745 changes: 1,027 additions & 718 deletions docs/assets/teraslice-packages.excalidraw

Large diffs are not rendered by default.

Binary file modified docs/assets/teraslice-packages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
415 changes: 0 additions & 415 deletions docs/packages/teraslice-op-test-harness/overview.md

This file was deleted.

32 changes: 1 addition & 31 deletions docs/packages/teraslice-test-harness/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ npm install --save-dev teraslice-test-harness

This package exports a few different test harnesses for running your operation.

**Note:** All TestHarnesses except `OpTestHarness` can take a path to the asset directory so it can the test can load and fully validate multiple different operations, if none are specified then it will assume it is running in a [asset bundle](../../asset-bundles/development.md).
**Note:** All TestHarnesses can take a path to the asset directory so it can the test can load and fully validate multiple different operations, if none are specified then it will assume it is running in a [asset bundle](../../asset-bundles/development.md).

### SlicerTestHarness

Expand Down Expand Up @@ -366,36 +366,6 @@ describe('Example Asset (Job)', () => {
});
```

### OpTestHarness

A simple test harness for running an single operation with minimal customizations. Based of the older [teraslice-op-test-harness](../teraslice-op-test-harness/overview.md) package.

**This is useful for testing Data in -> out on a Fetcher or Processor.**

**Usage:**

```js
const { OpTestHarness } = require('teraslice-test-harness');
const ExampleProcessor = require('../asset/example/processor');

describe('Example Asset (Op)', () => {
let harness;
beforeEach(() => {
harness = new OpTestHarness(ExampleProcessor);
return harness.initialize();
});

afterEach(() => {
return harness.shutdown();
});

it('should be able to run a slice', () => {
const input = [{ foo: 'bar' }, { bar: 'baz' }];
return expect(harness.run(input)).resolves.toBeArrayOfSize(2);
});
});
```

### DownloadExternalAssets

Used to test processors in separate asset bundles. It downloads a zipped asset bundle to ./test/.cache/downloads and unzips the asset to ./test/.cache/assets. At this point assets must be in a github repository to be downloaded.
Expand Down
1 change: 0 additions & 1 deletion packages/teraslice-test-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
},
"dependencies": {
"@terascope/fetch-github-release": "^0.8.10",
"@terascope/teraslice-op-test-harness": "^1.24.1",
"decompress": "^4.2.1",
"fs-extra": "^11.2.0"
},
Expand Down
4 changes: 0 additions & 4 deletions packages/teraslice-test-harness/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ export interface JobHarnessOptions {
cluster_manager_type?: ClusterManagerType
}

export interface OpTestHarnessOptions {
clients?: TestClientConfig[];
}

export type AnyOperationConstructor = ProcessorConstructor|SlicerConstructor;

export interface SliceResults {
Expand Down
1 change: 0 additions & 1 deletion packages/teraslice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"uuid": "^9.0.1"
},
"devDependencies": {
"@terascope/teraslice-op-test-harness": "^1.24.1",
"@types/archiver": "^6.0.2",
"@types/express": "^4.17.21",
"archiver": "^7.0.1",
Expand Down
9 changes: 0 additions & 9 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,6 @@
]
}
],
"Legacy": [
{
"type": "subcategory",
"label": "teraslice-op-test-harness",
"ids": [
"packages/teraslice-op-test-harness/overview"
]
}
],
"Internal": [
{
"type": "subcategory",
Expand Down
7 changes: 0 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2339,13 +2339,6 @@
lz4-asm "^0.4.2"
node-gzip "^1.1.2"

"@terascope/teraslice-op-test-harness@^1.24.1":
version "1.24.1"
resolved "https://registry.yarnpkg.com/@terascope/teraslice-op-test-harness/-/teraslice-op-test-harness-1.24.1.tgz#f3170cb5f659c927fb907d34c940181f9bfe48fa"
integrity sha512-T7tQ35S//2SY2gOgZxs7uPCEfLH0wAig2YV6gVTYLVBj7NivRtKgJx2EbwJGGQb0n3gNhNj/zn6AUKZ03+Q41A==
dependencies:
bluebird "^3.7.2"

"@terascope/types@^0.15.1":
version "0.15.1"
resolved "https://registry.yarnpkg.com/@terascope/types/-/types-0.15.1.tgz#2898c7361c57687d1b53a741c7555e8cba7804ca"
Expand Down
Loading