Blame tests/0_common/000_centos_default_repos.py
|
Athmane Madjoudj |
509fd6 |
#!/usr/bin/python
|
|
Athmane Madjoudj |
509fd6 |
# Author: Athmane Madjoudj <athmanem@gmail.com>
|
|
Karanbir Singh |
d76413 |
# Karanbir Singh <kbsingh@karan.org>
|
|
Athmane Madjoudj |
509fd6 |
# Test default CentOS repos
|
|
Athmane Madjoudj |
509fd6 |
|
|
Athmane Madjoudj |
509fd6 |
import yum
|
|
Athmane Madjoudj |
509fd6 |
import sys
|
|
Athmane Madjoudj |
509fd6 |
|
|
Athmane Madjoudj |
509fd6 |
yb = yum.YumBase()
|
|
Athmane Madjoudj |
509fd6 |
centos_default_repos = ['base','extras','updates']
|
|
Athmane Madjoudj |
509fd6 |
print "Check if non default repo is enabled"
|
|
Athmane Madjoudj |
509fd6 |
for repo in yb.repos.listEnabled():
|
|
Athmane Madjoudj |
509fd6 |
if not repo.id in centos_default_repos:
|
|
Karanbir Singh |
d76413 |
print '%s is enabled, should be disabled at this stage' % repo.id
|
|
Athmane Madjoudj |
509fd6 |
print '-> FAIL'
|
|
Athmane Madjoudj |
509fd6 |
sys.exit(1)
|
|
Athmane Madjoudj |
509fd6 |
print '-> PASS'
|
|
Athmane Madjoudj |
509fd6 |
sys.exit(0)
|
|
Athmane Madjoudj |
509fd6 |
|