diff options
author | baude <bbaude@redhat.com> | 2018-03-26 09:39:14 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-04-23 14:29:45 +0000 |
commit | 8493dba23c73617d9529b7ca13b400d50ac6f455 (patch) | |
tree | c0de0c67334b9fa7166e01cae95dc560c1e2455a /test/varlink/test_system.py | |
parent | cf1d884ffa45b342f38a78189bbd86186ce6cbfe (diff) | |
download | podman-8493dba23c73617d9529b7ca13b400d50ac6f455.tar.gz podman-8493dba23c73617d9529b7ca13b400d50ac6f455.tar.bz2 podman-8493dba23c73617d9529b7ca13b400d50ac6f455.zip |
Initial varlink implementation
Signed-off-by: baude <bbaude@redhat.com>
Closes: #627
Approved by: mheon
Diffstat (limited to 'test/varlink/test_system.py')
-rw-r--r-- | test/varlink/test_system.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/varlink/test_system.py b/test/varlink/test_system.py new file mode 100644 index 000000000..6180d2068 --- /dev/null +++ b/test/varlink/test_system.py @@ -0,0 +1,21 @@ +import unittest +from varlink import (Client, VarlinkError) + + +address = "unix:/run/podman/io.projectatomic.podman" +client = Client(address=address) + +class SystemAPI(unittest.TestCase): + def test_ping(self): + podman = client.open("io.projectatomic.podman") + response = podman.Ping() + self.assertEqual("OK", response["ping"]["message"]) + + def test_GetVersion(self): + podman = client.open("io.projectatomic.podman") + response = podman.GetVersion() + for k in ["version", "go_version", "built", "os_arch"]: + self.assertTrue(k in response["version"].keys()) + +if __name__ == '__main__': + unittest.main() |