Debian Codegraph @

debian/patches/disable-network-tests

raw
1 --- a/tests/unit/Stack/ConfigSpec.hs
2 +++ b/tests/unit/Stack/ConfigSpec.hs
3 @@ -284,26 +284,26 @@ spec = beforeAll setup $ do
4 bopts.haddockForHackage `shouldBe` True
5 bopts.forceDirty `shouldBe` True
6
7 - it "finds the config file in a parent directory" $ inTempDir $ do
8 - writeFile "package.yaml" "name: foo"
9 - writeFile (toFilePath stackDotYaml) sampleConfig
10 - parentDir <- getCurrentDirectory >>= parseAbsDir
11 - let childDir = "child"
12 - createDirectory childDir
13 - setCurrentDirectory childDir
14 - loadConfig' $ \config -> liftIO $ do
15 - bc <- runRIO config $ withBuildConfig ask
16 - view configFileRootL bc `shouldBe` parentDir
17 + -- it "finds the config file in a parent directory" $ inTempDir $ do
18 + -- writeFile "package.yaml" "name: foo"
19 + -- writeFile (toFilePath stackDotYaml) sampleConfig
20 + -- parentDir <- getCurrentDirectory >>= parseAbsDir
21 + -- let childDir = "child"
22 + -- createDirectory childDir
23 + -- setCurrentDirectory childDir
24 + -- loadConfig' $ \config -> liftIO $ do
25 + -- bc <- runRIO config $ withBuildConfig ask
26 + -- view configFileRootL bc `shouldBe` parentDir
27
28 - it "respects the STACK_YAML env variable" $ inTempDir $ do
29 - withSystemTempDir "config-is-here" $ \dir -> do
30 - let stackYamlFp = toFilePath (dir </> stackDotYaml)
31 - writeFile stackYamlFp sampleConfig
32 - writeFile (toFilePath dir ++ "/package.yaml") "name: foo"
33 - withEnvVar "STACK_YAML" stackYamlFp $
34 - loadConfig' $ \config -> liftIO $ do
35 - bc <- runRIO config $ withBuildConfig ask
36 - bc.configFile `shouldBe` Right (dir </> stackDotYaml)
37 + -- it "respects the STACK_YAML env variable" $ inTempDir $ do
38 + -- withSystemTempDir "config-is-here" $ \dir -> do
39 + -- let stackYamlFp = toFilePath (dir </> stackDotYaml)
40 + -- writeFile stackYamlFp sampleConfig
41 + -- writeFile (toFilePath dir ++ "/package.yaml") "name: foo"
42 + -- withEnvVar "STACK_YAML" stackYamlFp $
43 + -- loadConfig' $ \config -> liftIO $ do
44 + -- bc <- runRIO config $ withBuildConfig ask
45 + -- bc.configFile `shouldBe` Right (dir </> stackDotYaml)
46
47 it "STACK_YAML can be relative" $ inTempDir $ do
48 parentDir <- getCurrentDirectory >>= parseAbsDir