/usr/share/augeas/lenses/dist/tests/test_yum.aug is in augeas-lenses 1.4.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | (*
Module: Test_Yum
Provides unit tests and examples for the <Yum> lens.
*)
module Test_yum =
let yum_simple = "[sec1]
# comment
key=value
[sec-two]
key1=value1
# comment
key2=value2
"
let yum_conf = "[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
installonly_limit=100
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
"
let yum_repo1 = "[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
"
let yum_repo2 = "[remi]
name=Les RPM de remi pour FC$releasever - $basearch
baseurl=http://remi.collet.free.fr/rpms/fc$releasever.$basearch/
http://iut-info.ens.univ-reims.fr/remirpms/fc$releasever.$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test]
name=Les RPM de remi en test pour FC$releasever - $basearch
baseurl=http://remi.collet.free.fr/rpms/test-fc$releasever.$basearch/
http://iut-info.ens.univ-reims.fr/remirpms/test-fc$releasever.$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
"
let cont = "[main]\nbaseurl=url1\n url2 , url3\n \n"
test Yum.lns get yum_simple =
{ "sec1"
{ "#comment" = "comment" }
{ "key" = "value" }
}
{ "sec-two"
{ "key1" = "value1" }
{ "#comment" = "comment" }
{ "key2" = "value2" }
}
test Yum.lns put yum_conf after
rm "main"
= ""
test Yum.lns put yum_simple after
set "sec1/key" "othervalue"
= "[sec1]\n# comment\nkey=othervalue\n[sec-two]\nkey1=value1\n# comment\nkey2=value2\n"
test Yum.lns put yum_simple after
rm "sec1" ;
rm "sec-two/key1"
= "[sec-two]\n# comment\nkey2=value2\n"
test Yum.lns put yum_simple after
rm "sec1" ;
rm "sec-two/key1" ;
set "sec-two/newkey" "newvalue"
= "[sec-two]\n# comment\nkey2=value2\nnewkey=newvalue\n"
test Yum.lns put yum_simple after
rm "sec1" ;
set "sec-two/key1" "newvalue"
= "[sec-two]\nkey1=newvalue\n# comment\nkey2=value2\n"
test Yum.lns get cont =
{ "main"
{ "baseurl" = "url1" }
{ "baseurl" = "url2" }
{ "baseurl" = "url3" }
{}
}
test Yum.lns put cont after
set "main/gpgcheck" "1"
=
cont . "gpgcheck=1\n"
(* We are actually stricter than yum in checking syntax. The yum.conf *)
(* man page mentions that it is illegal to have multiple baseurl keys *)
(* in the same section, but yum will just carry on, usually with *)
(* results that surpise the unsuspecting user *)
test Yum.lns get "[repo]\nbaseurl=url1\nbaseurl=url2\n" = *
(* This checks that we take the right branch in the section lens. *)
test Yum.record get "[repo]\nname=A name\nbaseurl=url1\n" =
{ "repo"
{ "name" = "A name" }
{ "baseurl" = "url1" } }
(* Handle continuation lines for gpgkey; bug #132 *)
test Yum.lns get "[main]\ngpgkey=key1\n key2\n" =
{ "main"
{ "gpgkey" = "key1" }
{ "gpgkey" = "key2" } }
test Yum.lns get yum_repo1 =
{ "fedora"
{ "name" = "Fedora $releasever - $basearch" }
{ "failovermethod" = "priority" }
{ "#comment" = "baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/" }
{ "mirrorlist" = "http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch" }
{ "enabled" = "1" }
{ "gpgcheck" = "1" }
{ "gpgkey" = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora" }
{ "gpgkey" = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY" }
{ }
}
{ "fedora-debuginfo"
{ "name" = "Fedora $releasever - $basearch - Debug" }
{ "failovermethod" = "priority" }
{ "#comment" = "baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/" }
{ "mirrorlist" = "http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch" }
{ "enabled" = "0" }
{ "gpgcheck" = "1" }
{ "gpgkey" = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora" }
{ "gpgkey" = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY" }
{ }
}
{ "fedora-source"
{ "name" = "Fedora $releasever - Source" }
{ "failovermethod" = "priority" }
{ "#comment" = "baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/" }
{ "mirrorlist" = "http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch" }
{ "enabled" = "0" }
{ "gpgcheck" = "1" }
{ "gpgkey" = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora" }
{ "gpgkey" = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY" }
}
test Yum.lns get yum_repo2 =
{ "remi"
{ "name" = "Les RPM de remi pour FC$releasever - $basearch" }
{ "baseurl" = "http://remi.collet.free.fr/rpms/fc$releasever.$basearch/" }
{ "baseurl" = "http://iut-info.ens.univ-reims.fr/remirpms/fc$releasever.$basearch/" }
{ "enabled" = "0" }
{ "gpgcheck" = "1" }
{ "gpgkey" = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi" }
{ }
}
{ "remi-test"
{ "name" = "Les RPM de remi en test pour FC$releasever - $basearch" }
{ "baseurl" = "http://remi.collet.free.fr/rpms/test-fc$releasever.$basearch/" }
{ "baseurl" = "http://iut-info.ens.univ-reims.fr/remirpms/test-fc$releasever.$basearch/" }
{ "enabled" = "0" }
{ "gpgcheck" = "1" }
{ "gpgkey" = "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi" }
}
(* Test: Yum.lns
Check that we can parse an empty line, to fix test-save *)
test Yum.lns get "\n" = { }
(* Test: Yum.lns
Issue #45: allow spaces around equals sign *)
test Yum.lns get "[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge\n" =
{ "rpmforge"
{ "name" = "RHEL $releasever - RPMforge.net - dag" }
{ "baseurl" = "http://apt.sw.be/redhat/el6/en/$basearch/rpmforge" }
}
(* Test: Yum.lns
Issue #275: parse excludes as a list *)
test Yum.lns get "[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
exclude=ocs* clamav*
" =
{ "epel"
{ "name" = "Extra Packages for Enterprise Linux 6 - $basearch" }
{ "exclude" = "ocs*" }
{ "exclude" = "clamav*" } }
(* Local Variables: *)
(* mode: caml *)
(* End: *)
|