This repository was archived by the owner on Dec 20, 2024. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -92,3 +92,32 @@ func (s *SupernodeConfigTestSuite) TestGetSuperCID(c *check.C) {
9292
9393	c .Assert (conf .GetSuperCID ("taskID" ), check .DeepEquals , "CIDPrefixtaskID" )
9494}
95+ 
96+ func  (s  * SupernodeConfigTestSuite ) TestIsSuperCID (c  * check.C ) {
97+ 	conf  :=  Config {
98+ 		BaseProperties : & BaseProperties {cIDPrefix : "CIDPrefix" },
99+ 	}
100+ 
101+ 	c .Assert (conf .IsSuperCID ("CIDPrefixTest" ), check .DeepEquals , true )
102+ 	c .Assert (conf .IsSuperCID ("Test" ), check .DeepEquals , false )
103+ }
104+ 
105+ func  (s  * SupernodeConfigTestSuite ) TestGetSuperPID (c  * check.C ) {
106+ 	conf  :=  Config {
107+ 		BaseProperties : & BaseProperties {superNodePID : "superNodePID" },
108+ 	}
109+ 
110+ 	c .Assert (conf .GetSuperPID (), check .DeepEquals , "superNodePID" )
111+ 
112+ 	conf .SetSuperPID ("Test" )
113+ 	c .Assert (conf .GetSuperPID (), check .DeepEquals , "Test" )
114+ }
115+ 
116+ func  (s  * SupernodeConfigTestSuite ) TestIsSuperPID (c  * check.C ) {
117+ 	conf  :=  Config {
118+ 		BaseProperties : & BaseProperties {superNodePID : "superNodePID" },
119+ 	}
120+ 
121+ 	c .Assert (conf .IsSuperPID ("superNodePID" ), check .DeepEquals , true )
122+ 	c .Assert (conf .IsSuperPID ("Test" ), check .DeepEquals , false )
123+ }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments