|
@@ -16,33 +16,32 @@ func TestPacmanConf(t *testing.T) {
|
|
t.Parallel()
|
|
t.Parallel()
|
|
|
|
|
|
expectedPacmanConf := &pacmanconf.Config{
|
|
expectedPacmanConf := &pacmanconf.Config{
|
|
- RootDir: "/",
|
|
|
|
- DBPath: "//var/lib/pacman/",
|
|
|
|
- CacheDir: []string{"/cachedir/", "/another/"},
|
|
|
|
- HookDir: []string{"/hookdir/"},
|
|
|
|
- GPGDir: "/gpgdir/",
|
|
|
|
- LogFile: "/logfile",
|
|
|
|
- HoldPkg: []string(nil),
|
|
|
|
- IgnorePkg: []string{"ignore", "this", "package"},
|
|
|
|
- IgnoreGroup: []string{"ignore", "this", "group"},
|
|
|
|
- Architecture: []string{"8086"},
|
|
|
|
- XferCommand: "",
|
|
|
|
- NoUpgrade: []string{"noupgrade"},
|
|
|
|
- NoExtract: []string{"noextract"},
|
|
|
|
- CleanMethod: []string{"KeepInstalled"},
|
|
|
|
- SigLevel: []string{"PackageOptional", "PackageTrustedOnly", "DatabaseOptional", "DatabaseTrustedOnly"},
|
|
|
|
- LocalFileSigLevel: []string(nil),
|
|
|
|
- RemoteFileSigLevel: []string(nil),
|
|
|
|
- UseSyslog: false,
|
|
|
|
- Color: false,
|
|
|
|
- UseDelta: 0,
|
|
|
|
- TotalDownload: false,
|
|
|
|
- CheckSpace: true,
|
|
|
|
- VerbosePkgLists: true,
|
|
|
|
- DisableDownloadTimeout: false,
|
|
|
|
|
|
+ RootDir: "/", DBPath: "/var/lib/pacman/",
|
|
|
|
+ CacheDir: []string{"/var/cache/pacman/pkg/"},
|
|
|
|
+ HookDir: []string{"/etc/pacman.d/hooks/"},
|
|
|
|
+ GPGDir: "/etc/pacman.d/gnupg/", LogFile: "/var/log/pacman.log",
|
|
|
|
+ HoldPkg: []string{"pacman", "glibc"}, IgnorePkg: []string{"xorm"},
|
|
|
|
+ IgnoreGroup: []string{"yorm"}, Architecture: []string{"x86_64"},
|
|
|
|
+ XferCommand: "/usr/bin/wget --passive-ftp -c -O %o %u",
|
|
|
|
+ NoUpgrade: []string(nil), NoExtract: []string(nil), CleanMethod: []string{"KeepInstalled"},
|
|
|
|
+ SigLevel: []string{"PackageRequired", "PackageTrustedOnly", "DatabaseOptional", "DatabaseTrustedOnly"},
|
|
|
|
+ LocalFileSigLevel: []string{"PackageOptional", "PackageTrustedOnly"},
|
|
|
|
+ RemoteFileSigLevel: []string{"PackageRequired", "PackageTrustedOnly"}, UseSyslog: true,
|
|
|
|
+ Color: true, UseDelta: 0, TotalDownload: false, CheckSpace: true,
|
|
|
|
+ VerbosePkgLists: true, DisableDownloadTimeout: false,
|
|
Repos: []pacmanconf.Repository{
|
|
Repos: []pacmanconf.Repository{
|
|
- {Name: "repo1", Servers: []string{"repo1"}, SigLevel: []string(nil), Usage: []string{"All"}},
|
|
|
|
- {Name: "repo2", Servers: []string{"repo2"}, SigLevel: []string(nil), Usage: []string{"All"}},
|
|
|
|
|
|
+ {
|
|
|
|
+ Name: "core", Servers: []string{"Core"},
|
|
|
|
+ SigLevel: []string(nil), Usage: []string{"All"},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ Name: "extra", Servers: []string{"Extra"}, SigLevel: []string(nil),
|
|
|
|
+ Usage: []string{"All"},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ Name: "multilib", Servers: []string{"repo3", "multilib"},
|
|
|
|
+ SigLevel: []string(nil), Usage: []string{"All"},
|
|
|
|
+ },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
|