summaryrefslogtreecommitdiffstats
path: root/test/unit/test_swift.py
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-08-19 14:59:30 -0400
committerPeter Portante <pportant@redhat.com>2013-08-21 12:08:06 -0700
commitb901993c480d9f3e5b4a5372e4cdfdc053a41eab (patch)
tree647a54e5eebaef677b34c4d4d33317a5716f6e56 /test/unit/test_swift.py
parent6af843ed312ee8adc4be17b4f684a196b2f4b305 (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>
Diffstat (limited to 'test/unit/test_swift.py')
-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: