summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-08-19 14:59:30 -0400
committerLuis Pabon <lpabon@redhat.com>2013-08-21 13:41:16 -0700
commit54bb5bec7a025eecb51f85274ec37dbd0c478758 (patch)
tree5652aabcff85e20c6a02f294338ac64385b861dd /test
parent4023c7277ffb79df7021742143f403cd415047e8 (diff)
Fix spec file to support source rpms
Our initial implementation only required Jenkins to export binary RPMs, but as we move foward, we really need to also export SRPMs. To support SRPMs, the spec file in the RPM has to have the correct NAME, VERSION, and RELEASE information. Change-Id: Icd7132b4aafdbe7a1f02a35d0be7ad63b2e7c056 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/5669 Reviewed-by: Peter Portante <pportant@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Peter Portante <pportant@redhat.com> Reviewed-on: http://review.gluster.org/5679
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_swift.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/unit/test_swift.py b/test/unit/test_swift.py
index 5c78a8b..78c126c 100644
--- a/test/unit/test_swift.py
+++ b/test/unit/test_swift.py
@@ -29,24 +29,25 @@ class TestPkgInfo(unittest.TestCase):
"""
def test_constructor(self):
- pi = gs.PkgInfo('a', 'b', 'c')
+ pi = gs.PkgInfo('a', 'b', 'c', 'd')
assert pi.canonical_version == 'a'
- assert pi.name == 'b'
- assert pi.final == 'c'
+ assert pi.name == 'c'
+ self.assertEqual(pi.release, 'b')
+ assert pi.final == 'd'
def test_pretty_version(self):
- pi = gs.PkgInfo('a', 'b', False)
+ pi = gs.PkgInfo('a', 'b', 'c', False)
assert pi.pretty_version == 'a-dev'
- pi = gs.PkgInfo('a', 'b', True)
+ pi = gs.PkgInfo('a', 'b', 'c', True)
assert pi.pretty_version == 'a'
def test_save_config(self):
- pi = gs.PkgInfo('a', 'b', 'c')
+ pi = gs.PkgInfo('a', 'b', 'c', 'd')
td = tempfile.mkdtemp()
try:
sc = os.path.join(td, 'saved_config.txt')
pi.save_config(sc)
- exp = 'PKG_NAME=b\nPKG_VERSION=a\n'
+ exp = 'NAME=c\nVERSION=a\nRELEASE=b\n'
contents = file(sc, 'r').read()
assert contents == exp
finally: