12 Commits

Author SHA1 Message Date
Albert Esteve
fc6e58d9e6 reuse: addheader test/*.py
Add SPDX header to python files with
the 'py' extension in the test directory.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-10-18 13:04:20 +02:00
Nir Soffer
3fc44d98fc pypi: Eliminate the daemon directory
This make it easier to work with the project and to improve packaging.
For example, README.md is now at the expected location, so it is
packaged automatically for pypi.

Change-Id: Ib1a456054de34146bf2a4f39a69ccf1756b99e41
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-10-21 19:39:45 +03:00
Greg Padgett
1f409cdd31 test: Remove unused tests
Some tests were copied from the vdsm-imaged project; these should be
removed before new tests for the proxy are added.

Change-Id: I4b23ce07ab573705e7d3409f96f653c4ddbe3cf0
Signed-off-by: Greg Padgett <gpadgett@redhat.com>
2016-02-23 14:20:27 +02:00
Greg Padgett
d61c85dc46 image-proxy: Introducing ovirt-image-proxy
Change-Id: Ic5bb1a2afe40e4ec802d8e353b55275b5208d2d5
Signed-off-by: Greg Padgett <gpadgett@redhat.com>
2016-02-23 14:20:27 +02:00
Amit Aviram
92d234bc5c packaging: move image-daemon to a dedicated folder.
As a decision was made to move image-proxy and image-daemon under the
same repository, this patch moves image-daemon related files to its
specific directory.

Once this change is done, the next phase will be to start migrating code
from the image-proxy project into this one. The proxy code will also
reside in its own directory.

After that, common code and setup scripts will be made for easy setup.

Change-Id: I49a58d933272ee17e27666ba4a7ff55300dcadfe
Signed-off-by: Amit Aviram <aaviram@redhat.com>
2016-02-23 14:20:16 +02:00
Nir Soffer
256aee2bcf Rename to ovirt-image-daemon
We want to merge this project with ovirt-image-proxy, and have
consistent names. This also more consistent with other ovirt projects
(e.g. ovirt-engine, ovirt-hosted-engine-ha).

Change-Id: I7efd46413cc4dd4cc70e72eabc3c25e8ea986929
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2016-01-16 22:44:35 +02:00
Nir Soffer
2b9e8511ab tests: Use fixtures to create one server instance
Using pytest.fixture, we create now only one instance of uhttp server
and uhttp secure server, and reuse them for all tests. This save 1
second in the tests.

Change-Id: Ia47422e9b683c4fe659ad9be57b6112b19ff8907
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2016-01-05 13:36:10 +02:00
Nir Soffer
c40bb77c6b tests: Use temporary socket per test
Previously we use same socket for all uhttp tests at
/tmp/vdsm-uhttp-test.sock. This can cause tests to fail if a server
started by another test is still running and prevent parallel testing.
We also did not remove the socket after the tests.

Keep the socket in per-test temporary directory automatically cleaned up
by pytest.

Change-Id: If2a7deb62f2800fa144f2322051343ef2b4a8d0e
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2015-12-26 12:39:15 +02:00
Nir Soffer
cdd2ad2a8a tests: Use standard tmpdir fixture
Use pytest tmpdir fixture instead of tempfile.NamedTemporaryFile,
introducing additional nesting.

Change-Id: Ia387af9f6e07c19e0b0c7b3a6ce883d837591727
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2015-12-26 12:39:15 +02:00
Nir Soffer
8df3e5f7e8 tests: Add the missing uhttp tests
Add tests for error conditions, raising coverage to 100%.

Change-Id: I9e425cd3e7c87121bbbcf246e15d5a0a98d54fce
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2015-12-26 12:39:15 +02:00
Nir Soffer
7d2d9e3af2 util: Introduce the util module
Adding two generic utilities:
- start_thread - starts named daemonic thread with no boilerplate
- uninterruptible - repeat a function after an interrupted syscall

Change-Id: Iaa64e3f8dfa167fd13323ea07c9af15631d217f5
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2015-12-21 18:56:41 +02:00
Nir Soffer
c432aba185 Start vdsm-imaged daemon
vdsm-imaged provides direct access to oVirt disks using HTTPS protocol.
Together with ovirt-image-proxy, it allows uploading a disk image
directly into an oVirt disk, or downloading an oVirt disk.

See the README for the big picture.

Change-Id: I58c6471e700dfdae6ce643dcc0852935da56a962
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2015-06-14 18:04:25 +03:00