summaryrefslogtreecommitdiff
path: root/tools/test-cloud-meta-mock.py
Commit message (Collapse)AuthorAgeFilesLines
* test/cloud-meta-mock: mock GCP metadata APILubomir Rintel2023-05-121-0/+11
| | | | Not used for testing, but still might be useful for development.
* test/cloud-meta-mock: mock azure metadata APILubomir Rintel2023-05-121-0/+16
| | | | Not used for testing, but still might be useful for development.
* test/cloud-meta-mock: mock aliyun metadata APILubomir Rintel2023-05-121-0/+15
| | | | Not used for testing, but still might be useful for development.
* test/cloud-meta-mock: allow putting the resourcesLubomir Rintel2023-05-121-16/+58
| | | | | | | | | | | | | This reworks the cloud metadata mock server in a significant way. Most importantly this makes it possible for the client to add and modify the resources for later retrieval using the PUT method. This allows the test to create the fixture for itself. The default set of resources is still provided, so that the too remains useful as a development aid. If that is not desirable, the --empty parameter might be passed to cause the server to start with no resources.
* Revert "client/tests: don't do dup2() dance to pass file descriptor to ↵Lubomir Rintel2023-05-121-2/+4
| | | | | | | | | "tools/test-cloud-meta-mock.py"" This changed the fd passing protocol making it not compatible with systemd-socket-activate(1). This reverts commit 342ee618c75b350cf5cccf49f2bade85c5dfa3ea.
* client/tests: don't do dup2() dance to pass file descriptor to ↵Thomas Haller2023-03-301-4/+2
| | | | | | | | | | | | "tools/test-cloud-meta-mock.py" "preexec_fn" is not great, because it is not generally safe in multi threaded code (and we don't know whether the test didn't start other threads already, like a GDBus worker thread). Well, it probably is safe, if you only call async signal safe code, but it's not clear what os.dup2() does under the hood. Just avoid that. We can pass on the FD directly.
* tools/test-cloud-meta-mock: add a mock metadata server for cloud-setupLubomir Rintel2023-03-211-0/+90
Useful for testing/development.