Skip to content

Commit

Permalink
Resolve issues reported by DeepSource
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalre committed Jan 25, 2023
1 parent dd2530a commit 9241897
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/test/suite/controller/processor-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ suite("Test ProcessorController - preprocess() & postprocess()", () => {
})

test("test setting useArrayProcessor = true", () => {
const text = 'test: [ "CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "${DB_USER}" ]'
const text = 'test: [ "CMD", "pg_isready", "-q", "-d", "DB_NAME", "-U", "DB_USER" ]'
const processor = new ProcessorController(text)

processor.preprocess()

equal(processor.arrayprocessor.store.size, 1)
})
test("test setting useArrayProcessor = false", () => {
let text = 'test: [ "CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "${DB_USER}" ]'
let text = 'test: [ "CMD", "pg_isready", "-q", "-d", "DB_NAME", "-U", "DB_USER" ]'
const processor = new ProcessorController(text)
processor.settings.useArrayProcessor = false

Expand Down
4 changes: 2 additions & 2 deletions src/test/suite/processor/array-processor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { ArrayProcessor } from "../../../processor/array-processor"

suite("Test HelmProcessor - preprocess()", () => {
test("should replace all helm values", () => {
const text = 'test: [ "CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "${DB_USER}" ]'
const text = 'test: [ "CMD", "pg_isready", "-q", "-d", "DB_NAME", "-U", "DB_USER" ]'
const arrayprocessor = new ArrayProcessor(text)

arrayprocessor.preprocess()

equal(arrayprocessor.store.size, 1)
equal(arrayprocessor.store.get("vscode-yaml-sort.array.0"), '[ "CMD", "pg_isready", "-q", "-d", "${DB_NAME}", "-U", "${DB_USER}" ]')
equal(arrayprocessor.store.get("vscode-yaml-sort.array.0"), '[ "CMD", "pg_isready", "-q", "-d", "DB_NAME", "-U", "DB_USER" ]')
})
})

0 comments on commit 9241897

Please sign in to comment.