Skip to content

Commit 0f9d342

Browse files
committed
chore: organise unittests according to the supervisor/scanner split
moving the unit tests to a scanner/supervisor directory based on the unit they are testing. tests with an unclear placement remain untouched until their correlating units move.
1 parent 65b1c32 commit 0f9d342

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

test/unit/metadata-extractor.test.ts renamed to test/unit/supervisor/metadata-extractor.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import * as fs from 'fs';
33
import * as YAML from 'yaml';
44

55
import { V1OwnerReference, V1Pod, V1Deployment } from '@kubernetes/client-node';
6-
import * as supervisorTypes from '../../src/supervisor/types';
6+
import * as supervisorTypes from '../../../src/supervisor/types';
77

8-
import * as metadataExtractor from '../../src/supervisor/metadata-extractor';
8+
import * as metadataExtractor from '../../../src/supervisor/metadata-extractor';
99

1010
tap.test('isPodAssociatedWithParent', async (t) => {
1111
const mockPodWithoutMetadata = {};

test/unit/pod-watch-handler-caches.test.ts renamed to test/unit/supervisor/pod-watch-handler-caches.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import * as YAML from 'yaml';
66
import async = require('async');
77

88
import { V1PodSpec, V1Pod } from '@kubernetes/client-node';
9-
import transmitterTypes = require('../../src/transmitter/types');
10-
import * as metadataExtractor from '../../src/supervisor/metadata-extractor';
9+
import transmitterTypes = require('../../../src/transmitter/types');
10+
import * as metadataExtractor from '../../../src/supervisor/metadata-extractor';
1111

1212
let pushCallCount = 0;
1313
sinon.stub(async, 'queue').returns({ error: () => { }, push: () => pushCallCount++ } as any);
1414

15-
import * as pod from '../../src/supervisor/watchers/handlers/pod';
15+
import * as pod from '../../../src/supervisor/watchers/handlers/pod';
1616

1717
tap.test('image and workload image cache', async (t) => {
1818
const podSpecFixture = fs.readFileSync('./test/fixtures/pod-spec.json', 'utf8');

test/unit/watchers.test.ts renamed to test/unit/supervisor/watchers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as tap from 'tap';
22
import { V1Namespace } from '@kubernetes/client-node';
33

4-
import watchers = require('../../src/supervisor/watchers');
4+
import watchers = require('../../../src/supervisor/watchers');
55

66
tap.test('extractNamespaceName', async (t) => {
77
const namespaceEmpty = {} as V1Namespace;

test/unit/workload-reader.test.ts renamed to test/unit/supervisor/workload-reader.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as tap from 'tap';
22

3-
import { SupportedWorkloadTypes, getSupportedWorkload } from '../../src/supervisor/workload-reader';
3+
import { SupportedWorkloadTypes, getSupportedWorkload } from '../../../src/supervisor/workload-reader';
44
import { V1OwnerReference } from '@kubernetes/client-node';
55

66
tap.test('SupportedWorkloadTypes', async (t) => {

0 commit comments

Comments
 (0)