Skip to content

Commit 282201c

Browse files
author
Peter Hauge
committed
test: remove --otel tests after option removal
1 parent 26acd75 commit 282201c

2 files changed

Lines changed: 1 addition & 45 deletions

File tree

tests/unit/cli/index.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ describe('CLI entry point', () => {
4646
expect(result.stdout).toContain('--format');
4747
expect(result.stdout).toContain('--subscription-id');
4848
expect(result.stdout).toContain('--cloud');
49-
expect(result.stdout).toContain('--otel');
5049
expect(result.exitCode).toBe(0);
5150
});
5251

tests/unit/lib/config-loader.test.ts

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
4-
import { loadFilterConfig, loadOverrideConfig, loadOTelConfig } from '../../../src/lib/config-loader.js';
4+
import { loadFilterConfig, loadOverrideConfig } from '../../../src/lib/config-loader.js';
55
import { logger } from '../../../src/lib/logger.js';
66
import * as fs from 'node:fs/promises';
77
import * as path from 'node:path';
@@ -558,47 +558,4 @@ namedValues:
558558
);
559559
});
560560
});
561-
562-
describe('loadOTelConfig', () => {
563-
it('should load a valid OTel YAML file', async () => {
564-
const content = `
565-
exporters:
566-
otlp:
567-
endpoint: "http://localhost:4317"
568-
service:
569-
pipelines:
570-
traces:
571-
exporters: [otlp]
572-
`;
573-
const filePath = path.join(tmpDir, 'otel.yaml');
574-
await fs.writeFile(filePath, content, 'utf-8');
575-
576-
const config = await loadOTelConfig(filePath);
577-
expect(config).toBeDefined();
578-
expect(config!.exporters).toBeDefined();
579-
});
580-
581-
it('should return undefined for missing file', async () => {
582-
const config = await loadOTelConfig(path.join(tmpDir, 'nonexistent.yaml'));
583-
expect(config).toBeUndefined();
584-
});
585-
586-
it('should handle completely empty file', async () => {
587-
const filePath = path.join(tmpDir, 'blank.yaml');
588-
await fs.writeFile(filePath, '', 'utf-8');
589-
590-
const config = await loadOTelConfig(filePath);
591-
expect(config).toBeDefined();
592-
expect(config).toEqual({});
593-
});
594-
595-
it('should handle file with only whitespace', async () => {
596-
const filePath = path.join(tmpDir, 'whitespace.yaml');
597-
await fs.writeFile(filePath, ' \n \n ', 'utf-8');
598-
599-
const config = await loadOTelConfig(filePath);
600-
expect(config).toBeDefined();
601-
expect(config).toEqual({});
602-
});
603-
});
604561
});

0 commit comments

Comments
 (0)