@@ -523,26 +523,8 @@ describe('catalog', () => {
523523 expect ( isRancherRepo ( repo , null ) ) . toBe ( true ) ;
524524 } ) ;
525525
526- it ( 'should return true if repo is airgapped rancher-charts' , ( ) => {
527- const repo = { type : CATALOG . CLUSTER_REPO , name : 'rancher-charts' } as any ;
528-
529- expect ( isRancherRepo ( repo , null ) ) . toBe ( true ) ;
530- } ) ;
531-
532- it ( 'should return true if repo is airgapped rancher-partner-charts' , ( ) => {
533- const repo = { type : CATALOG . CLUSTER_REPO , name : 'rancher-partner-charts' } as any ;
534-
535- expect ( isRancherRepo ( repo , null ) ) . toBe ( true ) ;
536- } ) ;
537-
538- it ( 'should return false if repo is a namespace-scoped rancher-charts' , ( ) => {
539- const repo = { type : CATALOG . REPO , name : 'rancher-charts' } as any ;
540-
541- expect ( isRancherRepo ( repo , null ) ) . toBe ( false ) ;
542- } ) ;
543-
544- it ( 'should return false for unrelated repo' , ( ) => {
545- const repo = { type : CATALOG . CLUSTER_REPO , name : 'other-repo' } as any ;
526+ it ( 'should return false if repo is not a rancher source' , ( ) => {
527+ const repo = { isRancherSource : false } as any ;
546528
547529 expect ( isRancherRepo ( repo , null ) ) . toBe ( false ) ;
548530 } ) ;
@@ -581,26 +563,16 @@ describe('catalog', () => {
581563 } ) ;
582564
583565 it ( 'should fallback to LINUX for rancher repos and block windows nodes' , ( ) => {
584- const rancherRepo = { type : CATALOG . CLUSTER_REPO , name : 'rancher-charts' } as any ;
585- const chart = { versions : [ { version : '1.0.0' } ] } as any ;
586-
587- chart . isRancherRepo = ( isRancherRepo as any ) ( rancherRepo , chart ) ;
588-
566+ const chart = { isRancherRepo : true , versions : [ { version : '1.0.0' } ] } as any ;
589567 const versions = compatibleVersionsFor ( chart , 'windows' ) ;
590568
591- expect ( chart . isRancherRepo ) . toBe ( true ) ;
592569 expect ( versions ) . toHaveLength ( 0 ) ;
593570 } ) ;
594571
595572 it ( 'should not fallback to LINUX for non-rancher repos and allow windows nodes' , ( ) => {
596- const nonRancherRepo = { type : CATALOG . REPO , name : 'partner-charts' } as any ;
597- const chart = { versions : [ { version : '1.0.0' } ] } as any ;
598-
599- chart . isRancherRepo = ( isRancherRepo as any ) ( nonRancherRepo , chart ) ;
600-
573+ const chart = { isRancherRepo : false , versions : [ { version : '1.0.0' } ] } as any ;
601574 const versions = compatibleVersionsFor ( chart , 'windows' ) ;
602575
603- expect ( chart . isRancherRepo ) . toBe ( false ) ;
604576 expect ( versions ) . toHaveLength ( 1 ) ;
605577 } ) ;
606578 } ) ;
0 commit comments