File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,7 @@ impl GitManager {
121121
122122 async fn create_default_directories ( & self ) -> Result < ( ) > {
123123 let base_path = PathBuf :: from ( UPLOAD_DIR ) . join ( self . problem_id . to_string ( ) ) ;
124- let directories = [
125- "solutions/accepted" ,
126- "solutions/rejected" ,
127- "tests" ,
128- "statements" ,
129- ] ;
124+ let directories = [ "solutions" , "tests" , "statements" ] ;
130125 for dir in directories {
131126 let path = base_path. join ( dir) ;
132127 fs:: create_dir_all ( path)
@@ -236,6 +231,9 @@ mod tests {
236231 let problem_id = 12 ;
237232 let git_manager = GitManager :: new ( problem_id) ;
238233 assert ! ( git_manager. create_default_directories( ) . await . is_ok( ) ) ;
234+ assert ! ( Path :: new( format!( "{UPLOAD_DIR}/{problem_id}/solutions" ) . as_str( ) ) . exists( ) ) ;
235+ assert ! ( Path :: new( format!( "{UPLOAD_DIR}/{problem_id}/tests" ) . as_str( ) ) . exists( ) ) ;
236+ assert ! ( Path :: new( format!( "{UPLOAD_DIR}/{problem_id}/statements" ) . as_str( ) ) . exists( ) ) ;
239237
240238 fs:: remove_dir_all ( format ! ( "{UPLOAD_DIR}/{problem_id}" ) ) . await ?;
241239 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments