File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed
packages/git-proxy-cli/test Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ describe('test git-proxy-cli', function () {
563563 await helper . startServer ( service as unknown as Proxy ) ;
564564 await helper . runCli ( `${ CLI_PATH } login --username admin --password admin` ) ;
565565
566- const cli = `${ CLI_PATH } create-user --username ${ uniqueUsername } --password newpass --email new @email.com --gitAccount newgit` ;
566+ const cli = `${ CLI_PATH } create-user --username ${ uniqueUsername } --password newpass --email ${ uniqueUsername } @email.com --gitAccount newgit` ;
567567 const expectedExitCode = 0 ;
568568 const expectedMessages = [ `User '${ uniqueUsername } ' created successfully` ] ;
569569 const expectedErrorMessages = null ;
@@ -573,7 +573,7 @@ describe('test git-proxy-cli', function () {
573573 await helper . runCli (
574574 `${ CLI_PATH } login --username ${ uniqueUsername } --password newpass` ,
575575 0 ,
576- [ `Login "${ uniqueUsername } " <new @email.com>: OK` ] ,
576+ [ `Login "${ uniqueUsername } " <${ uniqueUsername } @email.com>: OK` ] ,
577577 null ,
578578 ) ;
579579 } finally {
Original file line number Diff line number Diff line change @@ -24,16 +24,14 @@ try {
2424}
2525db . setAutocompactionInterval ( COMPACTION_INTERVAL ) ;
2626
27- const defaultPushQuery : PushQuery = {
27+ const defaultPushQuery : Partial < PushQuery > = {
2828 error : false ,
2929 blocked : true ,
3030 allowPush : false ,
3131 authorised : false ,
32- canceled : false ,
33- rejected : false ,
3432} ;
3533
36- export const getPushes = ( query : PushQuery ) : Promise < Action [ ] > => {
34+ export const getPushes = ( query : Partial < PushQuery > ) : Promise < Action [ ] > => {
3735 if ( ! query ) query = defaultPushQuery ;
3836 return new Promise ( ( resolve , reject ) => {
3937 db . find ( query , ( err : Error , docs : Action [ ] ) => {
Original file line number Diff line number Diff line change @@ -5,16 +5,16 @@ import { PushQuery } from '../types';
55
66const collectionName = 'pushes' ;
77
8- const defaultPushQuery : PushQuery = {
8+ const defaultPushQuery : Partial < PushQuery > = {
99 error : false ,
1010 blocked : true ,
1111 allowPush : false ,
1212 authorised : false ,
13- canceled : false ,
14- rejected : false ,
1513} ;
1614
17- export const getPushes = async ( query : PushQuery = defaultPushQuery ) : Promise < Action [ ] > => {
15+ export const getPushes = async (
16+ query : Partial < PushQuery > = defaultPushQuery ,
17+ ) : Promise < Action [ ] > => {
1818 return findDocuments < Action > ( collectionName , query , {
1919 projection : {
2020 _id : 0 ,
You can’t perform that action at this time.
0 commit comments