Skip to content

Commit

Permalink
test(repo): fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jwulf committed Feb 29, 2024
1 parent e89a212 commit b0a69fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
14 changes: 4 additions & 10 deletions src/modeler/__test__/modeler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ModelerApiClient } from '../index'
import 'dotenv/config'
import { ModelerApiClient } from '../index'

const modeler = new ModelerApiClient()

Expand All @@ -9,17 +9,11 @@ test('It can get info', async () => {
})

test('', async () => {
const res = await modeler.searchProjects({ filter: { name: '__test__' } })
let res
res = await modeler.searchProjects({ filter: { name: '__test__' } })
if (res.items.length === 0) {
console.log('Creating project')
await modeler.createProject('__test__')
console.log(
JSON.stringify(
await modeler.searchProjects({ filter: { name: '__test__' } }),
null,
2
)
)
res = await modeler.createProject('__test__')
}
expect(res).toBeTruthy()
})
5 changes: 3 additions & 2 deletions src/zeebe/__tests__/ConfigurationHydrator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const ENV_VARS_TO_STORE = [
'ZEEBE_CLIENT_SSL_PRIVATE_KEY_PATH',
'ZEEBE_CLIENT_SSL_CERT_CHAIN_PATH',
'ZEEBE_TENANT_ID',
'ZEEBE_SECURE_CONNECTION',
]

beforeAll(() => {
Expand Down Expand Up @@ -449,12 +450,12 @@ test('Is insecure by default', () => {
const conf = ConfigurationHydrator.configure('localhost:26600', {})
expect(conf.useTLS).toBeFalsy()
})
test('Can be secured via the environment', () => {
test('Can be unsecured via the environment', () => {
process.env.ZEEBE_SECURE_CONNECTION = 'false'
const conf = ConfigurationHydrator.configure('localhost:26600', {})
expect(conf.useTLS).toBe(false)
})
test('Can be unsecured via the environment', () => {
test('Can be secured via the environment', () => {
process.env.ZEEBE_SECURE_CONNECTION = 'true'
const conf = ConfigurationHydrator.configure('localhost:26600', {})
expect(conf.useTLS).toBe(true)
Expand Down
File renamed without changes.

0 comments on commit b0a69fa

Please sign in to comment.