Skip to content

Commit 96a2e8f

Browse files
stejskalleosevgeni
authored andcommitted
SAT-40191 Compute resources & plugins
Allow enabling and installing of two features: foreman_azure_rm & foreman_google This includes foreman plugins and hammer-cli plugins. Related tasks * theforeman/foreman-oci-images@5c09bfb
1 parent 02a46c4 commit 96a2e8f

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ jobs:
105105
- name: Add optional feature - foreman-proxy
106106
run: |
107107
./foremanctl deploy --add-feature foreman-proxy
108+
- name: Add optional feature - foreman_azure_rm and foreman_google
109+
run: |
110+
./foremanctl deploy --add-feature foreman_azure_rm --add-feature foreman_google
108111
- name: Run tests
109112
run: |
110113
./forge test --pytest-args="--certificate-source=${{ matrix.certificate_source }} --database-mode=${{ matrix.database }}"
@@ -211,6 +214,9 @@ jobs:
211214
- name: Add optional feature - foreman-proxy
212215
run: |
213216
./foremanctl deploy --add-feature foreman-proxy
217+
- name: Add optional feature - foreman_azure_rm and foreman_google
218+
run: |
219+
./foremanctl deploy --add-feature foreman_azure_rm --add-feature foreman_google
214220
- name: Stop services
215221
run:
216222
vagrant ssh quadlet -- sudo systemctl stop foreman.target
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pytest
2+
3+
FOREMAN_HOST = 'localhost'
4+
FOREMAN_PORT = 3000
5+
6+
@pytest.mark.parametrize("compute_resource", ['AzureRm', 'EC2', 'GCE', 'Libvirt', 'Openstack', 'Vmware'])
7+
def test_foreman_compute_resources(server, compute_resource):
8+
hammer = server.run("hammer compute-resource create --help | grep provider")
9+
assert hammer.succeeded
10+
assert compute_resource in hammer.stdout

tests/foreman_plugins_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pytest
2+
3+
@pytest.mark.parametrize("foreman_plugin", ['foreman_azure_rm', 'foreman_google'])
4+
def test_foreman_compute_resources(foremanapi, foreman_plugin):
5+
plugins = [plugin['name'] for plugin in foremanapi.list('plugins')]
6+
assert foreman_plugin in plugins

0 commit comments

Comments
 (0)