summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/varlink/__init__.py0
-rw-r--r--test/varlink/podman_testcase.py28
-rwxr-xr-xtest/varlink/run_varlink_tests.sh34
-rw-r--r--test/varlink/test_containers.py89
-rw-r--r--test/varlink/test_images.py65
-rw-r--r--test/varlink/test_system.py19
6 files changed, 0 insertions, 235 deletions
diff --git a/test/varlink/__init__.py b/test/varlink/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/test/varlink/__init__.py
+++ /dev/null
diff --git a/test/varlink/podman_testcase.py b/test/varlink/podman_testcase.py
deleted file mode 100644
index c8395a5f1..000000000
--- a/test/varlink/podman_testcase.py
+++ /dev/null
@@ -1,28 +0,0 @@
-"""Custom TestCase for varlink/podman."""
-import os
-import unittest
-
-import varlink
-
-
-class PodmanTestCase(unittest.TestCase):
- """Provides varlink setup for podman."""
-
- def __init__(self, *args, **kwargs):
- """Initialize class by calling parent."""
- super(PodmanTestCase, self).__init__(*args, **kwargs)
- self.address = os.environ.get(
- 'PODMAN_HOST',
- 'unix:/run/podman/io.projectatomic.podman')
-
- def setUp(self):
- """Set up the varlink/podman fixture before each test."""
- super(PodmanTestCase, self).setUp()
- self.client = varlink.Client(
- address=self.address)
- self.podman = self.client.open('io.projectatomic.podman')
-
- def tearDown(self):
- """Deconstruct the varlink/podman fixture after each test."""
- super(PodmanTestCase, self).tearDown()
- self.podman.close()
diff --git a/test/varlink/run_varlink_tests.sh b/test/varlink/run_varlink_tests.sh
deleted file mode 100755
index fe82b39ef..000000000
--- a/test/varlink/run_varlink_tests.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-if [ ! -n "${PYTHON+ }" ]; then
- if hash python3 > /dev/null 2>&1; then
- PYTHON=$(hash -t python3)
- elif type python3 > /dev/null 2>&1; then
- PYTHON=$(type python3 | awk '{print $3}')
- elif hash python2 > /dev/null 2>&1; then
- PYTHON=$(hash -t python2)
- elif type python2 > /dev/null 2>&1; then
- PYTHON=$(type python2 | awk '{print $3}')
- else
- PYTHON='/usr/bin/python'
- fi
-fi
-
-# Create temporary directory for storage
-TMPSTORAGE=`mktemp -d /tmp/podman.XXXXXXXXXX`
-trap 'rm -fr ${TMPSTORAGE}' EXIT
-
-export PODMAN_HOST="unix:${TMPSTORAGE}/podman/io.projectatomic.podman"
-
-# Need a location to store the podman socket
-mkdir -p ${TMPSTORAGE}/podman
-
-bin/podman --version
-
-set -x
-# Run podman in background without systemd for test purposes
-bin/podman --storage-driver=vfs --root=${TMPSTORAGE}/crio \
- --runroot=${TMPSTORAGE}/crio-run varlink ${PODMAN_HOST} &
-
-${PYTHON} -m unittest discover -s test/varlink/ $@
-pkill podman
diff --git a/test/varlink/test_containers.py b/test/varlink/test_containers.py
deleted file mode 100644
index de2f8bbd7..000000000
--- a/test/varlink/test_containers.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import unittest
-
-from varlink import VarlinkError
-
-from podman_testcase import PodmanTestCase
-
-MethodNotImplemented = 'org.varlink.service.MethodNotImplemented'
-
-
-class TestContainersAPI(PodmanTestCase):
- def test_ListContainers(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.ListContainers()
-
- def test_CreateContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.CreateContainer()
-
- def test_InspecContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.InspectContainer()
-
- def test_ListContainerProcesses(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.ListContainerProcesses()
-
- def test_GetContainerLogs(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.GetContainerLogs()
-
- def test_ListContainerChanges(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.ListContainerChanges()
-
- def test_ExportContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.ExportContainer()
-
- def test_GetContainerStats(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.GetContainerStats()
-
- def test_ResizeContainerTty(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.ResizeContainerTty()
-
- def test_StartContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.StartContainer()
-
- def test_RestartContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.RestartContainer()
-
- def test_KillContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.KillContainer()
-
- def test_UpdateContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.UpdateContainer()
-
- def test_RenameContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.RenameContainer()
-
- def test_PauseContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.PauseContainer()
-
- def test_UnpauseContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.UnpauseContainer()
-
- def test_AttachToContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.AttachToContainer()
-
- def test_WaitContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.WaitContainer()
-
- def test_RemoveContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.RemoveContainer()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/varlink/test_images.py b/test/varlink/test_images.py
deleted file mode 100644
index 3c53f164e..000000000
--- a/test/varlink/test_images.py
+++ /dev/null
@@ -1,65 +0,0 @@
-import unittest
-
-from varlink import VarlinkError
-
-from podman_testcase import PodmanTestCase
-
-MethodNotImplemented = 'org.varlink.service.MethodNotImplemented'
-
-
-class TestImagesAPI(PodmanTestCase):
- def test_ListImages(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.ListImages()
-
- def test_BuildImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.BuildImage()
-
- def test_CreateImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.CreateImage()
-
- def test_InspectImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.InspectImage()
-
- def test_HistoryImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.HistoryImage()
-
- def test_PushImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.PushImage()
-
- def test_TagImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.TagImage()
-
- def test_RemoveImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.TagImage()
-
- def test_SearchImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.SearchImage()
-
- def test_DeleteUnusedImages(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.DeleteUnusedImages()
-
- def test_CreateFromContainer(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.CreateFromContainer()
-
- def test_ImportImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.ImportImage()
-
- def test_ExportImage(self):
- with self.assertRaisesRegex(VarlinkError, MethodNotImplemented):
- self.podman.ExportImage()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/varlink/test_system.py b/test/varlink/test_system.py
deleted file mode 100644
index 00848de2b..000000000
--- a/test/varlink/test_system.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import unittest
-
-from podman_testcase import PodmanTestCase
-
-
-class TestSystemAPI(PodmanTestCase):
- def test_ping(self):
- response = self.podman.Ping()
- self.assertEqual('OK', response['ping']['message'])
-
- def test_GetVersion(self):
- response = self.podman.GetVersion()
- self.assertTrue(set(
- ['version', 'go_version', 'built', 'os_arch']
- ).issubset(response['version'].keys()))
-
-
-if __name__ == '__main__':
- unittest.main()