(t *testing.T)
| 889 | } |
| 890 | |
| 891 | func TestConfigure_PkgCacheCacheArtifacts(t *testing.T) { |
| 892 | celer := newInitializedCeler(t) |
| 893 | |
| 894 | // Must create cache dir before setting cache dir; --pkgcache-cache-artifacts |
| 895 | // requires that the pkgcache dir is already configured (same group, runs in |
| 896 | // one command). |
| 897 | if err := os.MkdirAll(dirs.TestPkgCacheDir, os.ModePerm); err != nil { |
| 898 | t.Fatal(err) |
| 899 | } |
| 900 | cmd := &configureCmd{} |
| 901 | if _, err := runCommand(t, cmd.Command(celer), |
| 902 | "--pkgcache-dir="+dirs.TestPkgCacheDir, |
| 903 | "--pkgcache-cache-artifacts=true", |
| 904 | ); err != nil { |
| 905 | t.Fatal(err) |
| 906 | } |
| 907 | |
| 908 | celer2 := configs.NewCeler() |
| 909 | if err := celer2.Init(); err != nil { |
| 910 | t.Fatal(err) |
| 911 | } |
| 912 | if !celer2.PkgCacheConfig().GetCacheArtifacts() { |
| 913 | t.Fatal("pkgcache cache-artifacts should be `true`") |
| 914 | } |
| 915 | } |
| 916 | |
| 917 | func TestConfigure_PkgCacheCacheDownloads(t *testing.T) { |
| 918 | celer := newInitializedCeler(t) |
nothing calls this directly
no test coverage detected