Skip to content

Commit

Permalink
Update schemas (#3832)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Oct 11, 2023
1 parent 1e41277 commit c3af71f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
env:
# Number of expected test passes, safety measure for accidental skip of
# tests. Update value if you add/remove tests.
PYTEST_REQPASS: 832
PYTEST_REQPASS: 831
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion src/ansiblelint/schemas/__store__.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/requirements.json"
},
"role-arg-spec": {
"etag": "5113ade1d42ab250729da4a24772dd8abe8777d91f241388e4bf6033fe91ef98",
"etag": "c1eadbf5b551aeb9b8f2781728fb6d66453609b44a8921bcc65984ab3daf4bdc",
"url": "https://raw.githubusercontent.com/ansible/ansible-lint/main/src/ansiblelint/schemas/role-arg-spec.json"
},
"rulebook": {
Expand Down
15 changes: 0 additions & 15 deletions test/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import sys
import urllib
from pathlib import Path
from time import sleep
from typing import Any
from unittest.mock import DEFAULT, MagicMock, patch

Expand All @@ -23,20 +22,6 @@
)


def test_refresh_schemas() -> None:
"""Test for schema update skip."""
# This is written as a single test in order to avoid concurrency issues,
# which caused random issues on CI when the two tests run in parallel
# and or in different order.
assert refresh_schemas(min_age_seconds=3600 * 24 * 365 * 10) == 0
sleep(1)
# this should disable the cache and force an update
assert refresh_schemas(min_age_seconds=0) == 0
sleep(1)
# should be cached now
assert refresh_schemas(min_age_seconds=10) == 0


def urlopen_side_effect(*_args: Any, **kwargs: Any) -> DEFAULT:
"""Actual test that timeout parameter is defined."""
assert "timeout" in kwargs
Expand Down

0 comments on commit c3af71f

Please sign in to comment.