From 509fd6ed9d6834ed1244d1e85960c3077e5357ec Mon Sep 17 00:00:00 2001 From: Athmane Madjoudj Date: Aug 30 2011 14:51:29 +0000 Subject: Add CentOS default repos test --- diff --git a/tests/0_common/000_centos_default_repos.py b/tests/0_common/000_centos_default_repos.py new file mode 100755 index 0000000..ef02bc4 --- /dev/null +++ b/tests/0_common/000_centos_default_repos.py @@ -0,0 +1,17 @@ +#!/usr/bin/python +# Author: Athmane Madjoudj +# Test default CentOS repos + +import yum +import sys + +yb = yum.YumBase() +centos_default_repos = ['base','extras','updates'] +print "Check if non default repo is enabled" +for repo in yb.repos.listEnabled(): + if not repo.id in centos_default_repos: + print '-> FAIL' + sys.exit(1) +print '-> PASS' +sys.exit(0) +