File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -652,13 +652,18 @@ func TestAPI(t *testing.T) {
652
652
assert .Contains (t , fWatcher .addedPaths , configPath ,
653
653
"watcher should be watching the container's config file" )
654
654
655
+ // Make sure the start loop has been called.
656
+ fWatcher .waitNext (ctx )
657
+
655
658
// Send a file modification event and check if the container is
656
659
// marked dirty.
657
660
fWatcher .sendEventWaitNextCalled (ctx , fsnotify.Event {
658
661
Name : configPath ,
659
662
Op : fsnotify .Write ,
660
663
})
661
664
665
+ mClock .Advance (time .Minute ).MustWait (ctx )
666
+
662
667
// Check if the container is marked as dirty.
663
668
req = httptest .NewRequest (http .MethodGet , "/devcontainers" , nil )
664
669
rec = httptest .NewRecorder ()
@@ -671,7 +676,7 @@ func TestAPI(t *testing.T) {
671
676
assert .True (t , response .Devcontainers [0 ].Dirty ,
672
677
"container should be marked as dirty after config file was modified" )
673
678
674
- mClock .Advance (10 * time .Minute ).MustWait (ctx )
679
+ mClock .Advance (time .Minute ).MustWait (ctx )
675
680
676
681
container .ID = "new-container-id" // Simulate a new container ID after recreation.
677
682
container .FriendlyName = "new-container-name"
You can’t perform that action at this time.
0 commit comments