-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3502 from denibertovic/deni/3396-package-indices
Adds integration test for #3396
- Loading branch information
Showing
6 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import StackTest | ||
import System.Directory (createDirectory) | ||
import System.Environment (getEnv) | ||
import System.FilePath ((</>)) | ||
|
||
main :: IO () | ||
main = do | ||
home <- getEnv "HOME" | ||
createDirectory (home </> ".stack" </> "indices" </> "CustomIndex") | ||
copy "CustomIndex/01-index.tar" (home </> ".stack" </> "indices" </> "CustomIndex" </> "01-index.tar") | ||
stack ["build"] |
Binary file added
BIN
+200 KB
test/integration/tests/3396-package-indices/files/CustomIndex/01-index.tar
Binary file not shown.
19 changes: 19 additions & 0 deletions
19
test/integration/tests/3396-package-indices/files/files.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: files | ||
version: 0.1.0.0 | ||
-- synopsis: | ||
-- description: | ||
homepage: https://github.com/githubuser/files#readme | ||
license: BSD3 | ||
author: Author name here | ||
maintainer: [email protected] | ||
copyright: 2017 Author name here | ||
category: Web | ||
build-type: Simple | ||
cabal-version: >=1.10 | ||
|
||
library | ||
hs-source-dirs: src | ||
exposed-modules: Lib | ||
build-depends: base >= 4.7 && < 5 | ||
default-language: Haskell2010 | ||
|
11 changes: 11 additions & 0 deletions
11
test/integration/tests/3396-package-indices/files/my-snapshot.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
compiler: ghc-8.0.2 | ||
name: my-snapshot | ||
|
||
packages: | ||
- base-4.10.0.0 | ||
- dinamo-0.1.0.0 | ||
|
||
flags: | ||
dinamo: | ||
debug: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Lib | ||
( someFunc | ||
) where | ||
|
||
|
||
someFunc :: IO () | ||
someFunc = print "some func" | ||
|
18 changes: 18 additions & 0 deletions
18
test/integration/tests/3396-package-indices/files/stack.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
resolver: my-snapshot.yaml | ||
|
||
packages: | ||
- . | ||
|
||
extra-deps: [] | ||
|
||
# Override default flag values for local packages and extra-deps | ||
flags: {} | ||
|
||
# Extra package databases containing global packages | ||
extra-package-dbs: [] | ||
|
||
package-indices: | ||
- name: CustomIndex | ||
download-prefix: http://0.0.0.0:8080/ | ||
http: http://0.0.0.0:8080/custom.index.tar.gz | ||
|