mirror of
https://github.com/projectatomic/atomic.git
synced 2026-02-06 12:45:57 +01:00
Use the image already fetched through Docker of the fedora image instead of fetching it over the network each time. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #503 Approved by: cgwalters
26 lines
640 B
Python
26 lines
640 B
Python
import unittest
|
|
|
|
from Atomic import atomic
|
|
|
|
class TestAtomicPull(unittest.TestCase):
|
|
class Args():
|
|
def __init__(self):
|
|
self.image = "docker:fedora"
|
|
self.user = False
|
|
|
|
def test_pull_as_privileged_user(self):
|
|
args = self.Args()
|
|
with atomic.Atomic() as testobj:
|
|
testobj.set_args(args)
|
|
testobj.pull_image()
|
|
|
|
def test_pull_as_nonprivileged_user(self):
|
|
args = self.Args()
|
|
args.user = True
|
|
with atomic.Atomic() as testobj:
|
|
testobj.set_args(args)
|
|
testobj.pull_image()
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|