Skip to content

Commit c70d57b

Browse files
authored
Consider object_types as set in the response (#714)
1 parent 47d6513 commit c70d57b

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

.github/workflows/py3.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
python: ["3.10", "3.11", "3.12"]
16-
netbox: ["4.1", "4.2", "4.3"]
16+
netbox: ["4.2", "4.3", "4.4"]
1717

1818
steps:
1919
- uses: actions/checkout@v4
@@ -26,6 +26,11 @@ jobs:
2626
- name: Install dev requirements
2727
run: pip install -r requirements-dev.txt .
2828

29+
- name: Free up Docker resources
30+
run: |
31+
docker system prune -af --volumes
32+
docker network prune -f
33+
2934
- name: Run Linter
3035
run: black --diff --check pynetbox tests
3136

docs/development/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pytest tests/integration
3939
You can specify which versions of NetBox to test against using the `--netbox-versions` flag:
4040

4141
```bash
42-
pytest tests/integration --netbox-versions 4.1 4.2 4.3
42+
pytest tests/integration --netbox-versions 4.2 4.3 4.4
4343
```
4444

4545
### Running Specific Tests

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44
from packaging import version
55

6-
DEFAULT_NETBOX_VERSIONS = "4.3"
6+
DEFAULT_NETBOX_VERSIONS = "4.4"
77

88

99
def pytest_addoption(parser):

tests/integration/conftest.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ def get_netbox_docker_version_tag(netbox_version):
2626
"""
2727
major, minor = netbox_version.major, netbox_version.minor
2828

29-
if (major, minor) == (4, 1):
30-
tag = "3.0.2"
31-
elif (major, minor) == (4, 2):
32-
tag = "3.2.0"
29+
if (major, minor) == (4, 2):
30+
tag = "3.2.1"
3331
elif (major, minor) == (4, 3):
3432
tag = "3.3.0"
33+
elif (major, minor) == (4, 4):
34+
tag = "3.4.2"
3535
else:
3636
raise NotImplementedError(
3737
"Version %s is not currently supported" % netbox_version
@@ -263,6 +263,16 @@ def docker_compose_file(pytestconfig, netbox_docker_repo_dirpaths):
263263
# ensure the netbox container listens on a random port
264264
new_services[new_service_name]["ports"] = ["8080"]
265265

266+
# Increase health check timeouts for GitHub Actions runners
267+
# which may have more resource constraints
268+
new_services[new_service_name]["healthcheck"] = {
269+
"test": "curl -f http://localhost:8080/login/ || exit 1",
270+
"start_period": "180s", # Increased from 90s
271+
"timeout": "10s", # Increased from 3s
272+
"interval": "15s",
273+
"retries": 5,
274+
}
275+
266276
# set the network and an alias to the proper short name of the container
267277
# within that network
268278
new_services[new_service_name]["networks"] = {

0 commit comments

Comments
 (0)