File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -303,4 +303,39 @@ func TestFromFolders(t *testing.T) {
303
303
fileevent .Tagged : 5 ,
304
304
}, false , a .Jnl ())
305
305
})
306
+
307
+ t .Run ("date-from-name" , func (t * testing.T ) {
308
+ e2e .InitMyEnv ()
309
+ e2e .ResetImmich (t )
310
+
311
+ ctx := context .Background ()
312
+ c , a := cmd .RootImmichGoCommand (ctx )
313
+ c .SetArgs ([]string {
314
+ "upload" , "from-folder" ,
315
+ "--server=" + e2e .MyEnv ("IMMICHGO_SERVER" ),
316
+ "--api-key=" + e2e .MyEnv ("IMMICHGO_APIKEY" ),
317
+ "--no-ui" ,
318
+ "--api-trace" ,
319
+ "--log-level=debug" ,
320
+ "--tag=tag/subtag" ,
321
+ "--into-album=album" ,
322
+ "--date-from-name" ,
323
+ "DATA/dates" ,
324
+ })
325
+ err := c .ExecuteContext (ctx )
326
+ if err != nil && a .Log ().GetSLog () != nil {
327
+ a .Log ().Error (err .Error ())
328
+ }
329
+
330
+ if err != nil {
331
+ t .Error ("Unexpected error" , err )
332
+ return
333
+ }
334
+
335
+ e2e .CheckResults (t , map [fileevent.Code ]int64 {
336
+ fileevent .Uploaded : int64 (len (highJpgs )),
337
+ fileevent .UploadAddToAlbum : int64 (len (highJpgs )),
338
+ fileevent .Tagged : int64 (len (highJpgs )),
339
+ }, false , a .Jnl ())
340
+ })
306
341
}
You can’t perform that action at this time.
0 commit comments