Skip to content

Commit

Permalink
feat: Send debug if flag is set to true
Browse files Browse the repository at this point in the history
If the cozy is in debug mode, then let's send DEBUG true to the
Launcher in order to display the debug view
  • Loading branch information
Crash-- committed Jun 2, 2023
1 parent 28c2c3c commit 7299eea
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions packages/cozy-harvest-lib/src/models/ConnectionFlow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ describe('ConnectionFlow', () => {
connector: fixtures.clientKonnector,
konnector: fixtures.clientKonnector,
account: fixtures.existingAccount,
trigger: fixtures.existingTrigger
trigger: fixtures.existingTrigger,
DEBUG: false
}
})
)
Expand Down Expand Up @@ -651,7 +652,8 @@ describe('ConnectionFlow', () => {
message: 'startLauncher',
value: {
connector: fixtures.clientKonnector,
konnector: fixtures.clientKonnector
konnector: fixtures.clientKonnector,
DEBUG: false
}
})
)
Expand Down
4 changes: 3 additions & 1 deletion packages/cozy-harvest-lib/src/policies/clisk.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Clisk specific policy
*/
import flag from 'cozy-flags'

import { KonnectorJobError } from '../helpers/konnectors'
import logger from '../logger'
Expand Down Expand Up @@ -107,7 +108,8 @@ function startLauncher({ konnector, account, trigger, flow }) {
connector: konnector, // deprecated
konnector,
account,
trigger
trigger,
DEBUG: flag('debug') ? true : false
}
})
)
Expand Down
6 changes: 4 additions & 2 deletions packages/cozy-harvest-lib/src/policies/clisk.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ describe('onLaunch', () => {
message: 'startLauncher',
value: {
connector: { slug: 'testkonnectorslug' },
konnector: { slug: 'testkonnectorslug' }
konnector: { slug: 'testkonnectorslug' },
DEBUG: false
}
})
)
Expand Down Expand Up @@ -101,7 +102,8 @@ describe('onLaunch', () => {
connector: { slug: 'testkonnectorslug' },
konnector: { slug: 'testkonnectorslug' },
account: { _id: 'testaccountid' },
trigger: { _id: 'testtriggerid' }
trigger: { _id: 'testtriggerid' },
DEBUG: false
}
})
)
Expand Down

0 comments on commit 7299eea

Please sign in to comment.