File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ module IntegrationSpec where
66import Context
77import Control.Concurrent (readMVar )
88import Control.Concurrent.MVar (newEmptyMVar , putMVar )
9+ import Cradle qualified
910import Data.ByteString qualified as B
1011import Data.Maybe (fromMaybe )
1112import Data.String.Conversions
@@ -106,6 +107,14 @@ spec = around_ inTempDirectory $ do
106107 files <- listDirectory " ."
107108 files `shouldBe` []
108109
110+ it " `vmcli start` doesn't mess up the terminal" $ do
111+ withContext $ \ ctx -> do
112+ writeStandardFlake ctx Nothing
113+ Cradle. StdoutRaw before <- Cradle. run $ Cradle. cmd " stty" & Cradle. addArgs [" -a" :: Text ]
114+ _ <- assertSuccess $ test ctx [" start" , " server" ]
115+ Cradle. StdoutRaw after <- Cradle. run $ Cradle. cmd " stty" & Cradle. addArgs [" -a" :: Text ]
116+ after `shouldBe` before
117+
109118 it " starts vms with arbitrary hostnames" $ do
110119 withContext $ \ ctx -> do
111120 writeStandardFlake ctx (Just " { lib, ...} : { networking.hostName = lib.mkForce \" other-hostname\" ; }" )
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ runVm ctx verbosity vmName vmExecutable = do
143143 let mkProc stdout stdin =
144144 (System.Process. proc vmExecutable [] )
145145 { env = Just $ Map. toList $ Map. insert " NIX_DISK_IMAGE" nixDiskImage parentEnvironment,
146+ std_in = CreatePipe ,
146147 std_out = stdout,
147148 std_err = stdin
148149 }
You can’t perform that action at this time.
0 commit comments