Commit Graph

239 Commits

Author SHA1 Message Date
Javier Cano Cano
a6ef7e9a5a Add documentation running coverage analysis.
It documents how the coverage analyzer can be used to create a test
coverage report.

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-07-01 16:25:04 +02:00
kubevirt-bot
65f4ac6602 Merge pull request #107 from jcanocan/fix-pr-96-issues
tests: Address comments of #96
2024-06-14 14:36:24 +02:00
Javier Cano Cano
a8eb5643db tests: Address comments of #96
It fixes concerns posted on
https://github.com/kubevirt/kubevirt.core/pull/96

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-06-14 11:10:26 +02:00
kubevirt-bot
020f3c1380 Merge pull request #109 from 0xFelix/improve-e2e
Bump e2e software versions
2024-06-13 11:36:24 +02:00
Felix Matouschek
634ccb8363 chore: Bump versions in hack/e2e-setup.sh
Bump the versions of installed software components during the e2e test setup
to the latest stable releases.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-13 11:19:20 +02:00
Felix Matouschek
1a814389fe fix: Allow running make cluster-down when binaries are missing
Swap the order of commands in hack/e2e-setup.sh, so it becomes possible
to run 'make cluster-down` when the kind/kubectl binaries are missing.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-13 11:18:17 +02:00
kubevirt-bot
10b34fdf24 Merge pull request #101 from 0xFelix/apache2
Change license to Apache 2.0
2024-06-13 10:24:24 +02:00
Felix Matouschek
5d31db3ea2 chore: Change license Apache 2.0
Change the license of the collection to Apache 2.0 to be compliant with
the CNCF licensing requirements.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-11 11:39:32 +02:00
Felix Matouschek
df629ac39e chore: Drop vendored document fragments
Drop the vendored document fragments from kubernetes.core to slightly
enhance the documented options and to allow changing the license of the
collection.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-11 11:39:21 +02:00
kubevirt-bot
44e84622ed Merge pull request #108 from mperetzred/kubevirt_vm_ssh_key
kubevirt_vm integration tests: changed ssh key type to RSA for FIPS mode
2024-06-10 17:56:20 +02:00
mperetz
050799a084 kubevirt_vm integration tests: changed ssh key type to RSA for FIPS mode
Signed-off-by: mperetzred <mperetz@redhat.com>
2024-06-10 16:59:04 +03:00
kubevirt-bot
5c57d623aa Merge pull request #106 from 0xFelix/fix-kubevirt-vm-verify
fix(tests,kubevirt_vm): Fix assertion in verify.yml
2024-06-06 17:35:42 +02:00
Felix Matouschek
ea8447dee8 fix(tests,kubevirt_vm): Fix assertion in verify.yml
Fix the assertion that was introduced in
2521e8ba24 by removing the superfluous 'd'
at the end of the variable names.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-05 16:17:31 +02:00
kubevirt-bot
520bf8d74f Merge pull request #105 from 0xFelix/runtime-2.15
chore: Update supported ansible-core versions to >=2.15
2024-06-05 09:59:43 +02:00
Felix Matouschek
fa6601cbe4 chore: Update supported ansible-core versions to >=2.15
Update the supported versions of ansible-core to >=2.15.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-05 09:16:56 +02:00
kubevirt-bot
92b11b5584 Merge pull request #103 from 0xFelix/ci-fixes
Make kubevirt_vm tests more robust
2024-06-04 10:37:37 +02:00
Felix Matouschek
2521e8ba24 fix(tests,kubevirt_vm): Assert there are no or expected changes
Assert there are no or expected changes in verify.yml of the kubevirt_vm
integration test. This is necessary since in downstream tests the
kubemacpool operator might add annotations to the VM which can trigger a
changed result.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-04 09:53:53 +02:00
Felix Matouschek
e1b2094e4e fix(tests,kubevirt_vm): Make waiting for VM more robust
This changes the runme.sh of the kubevirt_vm integration tests to retry
the connection to the VM until a login is possible. This is necessary
since it is not possible with Ansible alone to retry a task in case the
connection failed with the unreachable status. This can happen when the
sshd of the VM already accepts connections but a login is not yet
possible because the VM is still booting up.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-04 09:53:53 +02:00
kubevirt-bot
4205a8328d Merge pull request #104 from 0xFelix/ansible-2.17
Bump tested ansible-core versions to 2.15-2.17
2024-06-04 08:21:35 +02:00
Felix Matouschek
57b172a865 chore(ci.yml): Bump tested ansible-core versions
Bump the tested ansible-core versions in integration.yml to the
latest supported versions (2.15-2.17).

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-03 16:41:40 +02:00
Felix Matouschek
14e9481e19 chore(integration.yml): Bump tested ansible-core versions
Bump the tested ansible-core versions in integration.yml to the latest
supported versions (2.15-2.17).

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-06-03 16:38:42 +02:00
kubevirt-bot
d81d9b1b96 Update changelog for release 1.4.0
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
1.4.0
2024-05-29 14:19:45 +00:00
kubevirt-bot
3a5100fd46 Merge pull request #102 from 0xFelix/bump-1.4.0
chore: Bump version to 1.4.0
2024-05-29 16:16:41 +02:00
Felix Matouschek
b910263304 chore: Bump version to 1.4.0
Bump version and add changelog with release summary.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-05-29 16:04:16 +02:00
kubevirt-bot
d4193f1d98 Merge pull request #100 from 0xFelix/kubernetes-core-4
fix: Ensure compatibility with kubernetes.core >=3.10,<4.1.0
2024-05-29 11:24:40 +02:00
Felix Matouschek
a9c6296794 fix: Ensure compatibility with kubernetes.core >=3.10,<4.1.0
Ensure compatibility with kubernetes.core >=3.10,<4.1.0 by replacing
deprecated imports of HAS_K8S_MODULE_HELPER and k8s_import_exception.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-05-29 10:11:05 +02:00
kubevirt-bot
131aacec43 Merge pull request #95 from 0xFelix/improved-docs
Provide links for docsite and improve docs by adding markup
2024-05-17 11:26:25 +02:00
kubevirt-bot
21c9bc8d4a Merge pull request #96 from jcanocan/add-inventory-tests
Add inventory unit tests
2024-05-17 11:24:25 +02:00
Javier Cano Cano
2b8767b424 test: add kubevirt inventory unit tests
Add unit tests for the following kubevirt functions:

- get_default_host_name
- get_host_from_service
- get_port_from_service
- parse
- fetch_objects
- get_cluster_domain
- get_available_namespaces
- get_vmis_for_namespace
- get_ssh_services_for_namespace
- set_ansible_host_and_port

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-05-15 17:41:50 +02:00
Javier Cano Cano
a1b0971b7f fix(kubevirt): fix inventory labels loop
Fix the for loop ranging over vmi labels. This loop is missing the
.items() statement, which it causes the following error:

```
for key, value in vmi.metadata.labels:
ValueError: too many values to unpack (expected 2)
```

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-05-15 16:23:45 +02:00
Javier Cano Cano
48b2a81679 fix(kubevirt): comment typo
Fix a small comment typo showing `LoadBalancer` instead of `NodePort`.

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-05-15 16:12:19 +02:00
Felix Matouschek
4851e5d20d docs: Improve docs by adding markup
Improve the generated documentations by adding Ansible documentation markup
where appropriate.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-05-08 11:06:57 +02:00
Felix Matouschek
0fd9f625ee docs: Provide links for docsite
Fill in the links.yml template and provide correct links and
communication channels for the collection.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-05-08 11:03:23 +02:00
kubevirt-bot
10d8c23138 Merge pull request #92 from jcanocan/add-template-tests
tests: add render_template unit tests
2024-04-29 10:54:05 +02:00
Javier Cano Cano
86d1d748df tests: add render_template unit tests
It adds unit tests for the render_template function. These test cases
cover all cases for non-mandatory fields in the VM template.

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-04-29 10:27:52 +02:00
kubevirt-bot
13ceaf0f2d Merge pull request #91 from 0xFelix/wait-condition-info
feat(kubevirt_vm_info): Set wait_condition based on running
2024-04-25 14:06:24 +02:00
Felix Matouschek
71a88007fe feat(kubevirt_vm_info): Set wait_condition based on running
Add the running parameter to kubevirt_vm_info from which the
wait_condition is derived from when parameter wait is set to
yes.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 18:48:39 +02:00
Felix Matouschek
9d24aa878d cleanup: Run formatter on test_kubevirt_vm.py
Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 18:38:51 +02:00
Felix Matouschek
03fcea0072 Merge pull request #90 from 0xFelix/docs-connections
docs: Use proper type for connections parameter

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 16:32:57 +02:00
kubevirt-bot
ce38c176a4 Merge pull request #86 from jcanocan/add-vm-delete-test
test: add kubevirt_vm delete test case
2024-04-24 16:08:25 +02:00
Javier Cano Cano
44936096ce test: add kubevirt_vm delete test case
Adds a test to assert deletion options are the expected.
Refactors python fixtures to reuse common fields in both create and
delete tests.

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-04-24 15:57:32 +02:00
kubevirt-bot
c13bdfbbaf Merge pull request #89 from 0xFelix/wait-condition
fix(kubevirt_vm): Set wait_condition based on running
2024-04-24 15:28:23 +02:00
Felix Matouschek
86cee0172f fix(kubevirt_vm): Set wait_condition based on running
To properly wait for a state change in the kubevirt_vm module the
wait_condition needs to adapted to the state of running.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 14:53:41 +02:00
Felix Matouschek
81418d7a30 Merge pull request #88 from 0xFelix/cleanup-yaml
cleanup: Cleanup YAML passed to k8s module

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 14:53:08 +02:00
Felix Matouschek
b232464dbe docs: Use proper type for connections parameter
The connections parameter is of type list of dicts.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 13:47:55 +02:00
Felix Matouschek
e5edf072cc cleanup: Cleanup YAML passed to k8s module
Cleanup the YAML passed to the k8s module so it conforms to yaml output
you would expect from yaml.dump. Also refactor the tests to get rid of
duplicate definitions and make use of pytest.mark.parametrize and
yaml.dump.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-04-24 12:16:10 +02:00
kubevirt-bot
0531ac6c42 Merge pull request #85 from jcanocan/add-vm-info-test
test: add kubevirt_vm test cases
2024-04-19 09:04:04 +02:00
Javier Cano Cano
3814d1deb5 test: add kubevirt_vm test cases
Adds unit test to assert VM label and field selectors work as expected.
Refactors python fixtures to reuse defaults and avoid code duplication.

Signed-off-by: Javier Cano Cano <jcanocan@redhat.com>
2024-04-18 17:01:30 +02:00
kubevirt-bot
8c7d55bb15 Update changelog for release 1.3.2
Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
1.3.2
2024-04-17 13:24:51 +00:00
kubevirt-bot
0b24160331 Merge pull request #84 from 0xFelix/bump-ver
chore: Bump version to 1.3.2
2024-04-17 15:24:00 +02:00