Skip to content

Commit 65191d7

Browse files
authored
Merge branch 'develop' into bugfix/64
2 parents cf6da29 + 4467e52 commit 65191d7

File tree

5 files changed

+34
-73
lines changed

5 files changed

+34
-73
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-20.04
1111
strategy:
1212
matrix:
13-
phpipam-version: ['1.4x', '1.5x']
13+
phpipam-version: ['v1.4x', 'v1.5x']
1414
python-version: ['3.7.x', '3.8.x', '3.9.x', '3.10.x']
1515
steps:
1616
- uses: actions/checkout@v2

.github/workflows/stale.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2+
#
3+
# You can adjust the behavior by modifying this file.
4+
# For more information, see:
5+
# https://github.com/actions/stale
6+
name: Mark stale issues and pull requests
7+
8+
on:
9+
schedule:
10+
- cron: '38 17 * * *'
11+
12+
permissions:
13+
issues: write
14+
pull-requests: write
15+
16+
jobs:
17+
stale:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/stale@v8
21+
with:
22+
# issue setup
23+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
24+
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
25+
exempt-issue-labels: 'accepted,enhancement,help wanted'
26+
# pr setup
27+
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment'
28+
exempt-pr-labels: 'help wanted,WIP'
29+
days-before-pr-close: -1 # never close stale PRs
30+
# deadlines config
31+
days-before-stale: 30
32+
days-before-close: 5

requirements-dev.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@ setuptools
1010
PyYAML
1111
bumpversion
1212
pytest
13-
pytest-replay
14-
pytest-vcr
1513
pytest-xdist
1614
coverage

tests/conftest.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -48,72 +48,3 @@ def find_all_test_cases():
4848

4949

5050
TEST_CASES = list(find_all_test_cases())
51-
52-
53-
def pytest_addoption(parser):
54-
"""Change command line options defaults.
55-
56-
We want run our tests only in three modes
57-
`live` - interact with an existing API
58-
`record` - interact with an existing API and record the interactions
59-
`replay` - replay previouly recorded interactions with API
60-
61-
:param parser: A parser object
62-
:type parser: object parser
63-
"""
64-
parser.addoption(
65-
"--vcrmode",
66-
action="store",
67-
default="replay",
68-
choices=["replay", "record", "live"],
69-
help="mode for vcr recording; one of ['replay', 'record', 'live']",
70-
)
71-
72-
73-
@pytest.fixture
74-
def vcrmode(request):
75-
"""Return vcrmode of a request.
76-
77-
:param request: A request object
78-
:type request: object request
79-
:return: vcrmode
80-
:rtype: str
81-
"""
82-
return request.config.getoption("vcrmode")
83-
84-
85-
def cassette_name(test_name=None):
86-
"""Generate cassette_name."""
87-
return 'tests/fixtures/{0}.yml'.format(test_name)
88-
89-
90-
FILTER_REQUEST_HEADERS = ['Authorization', 'Cookie', 'Token']
91-
FILTER_RESPONSE_HEADERS = ['Apipie-Checksum', 'Date', 'ETag', 'Server', 'Set-Cookie', 'Via', 'X-Powered-By', 'X-Request-Id', 'X-Runtime']
92-
93-
94-
def filter_response(response):
95-
"""Filter headers before recording.
96-
97-
:param response: A response object where we want to filter the headers from.
98-
:type response: object response
99-
:return: response
100-
:rtype: object response
101-
"""
102-
for header in FILTER_RESPONSE_HEADERS:
103-
# headers should be case insensitive, but for some reason they weren't for me
104-
response['headers'].pop(header.lower(), None)
105-
response['headers'].pop(header, None)
106-
107-
return response
108-
109-
110-
def filter_request_uri(request):
111-
"""Filter uri before recording.
112-
113-
:param request: A request object where we want to filter the uri from.
114-
:type request: object request
115-
:return: request
116-
:rtype: object request
117-
"""
118-
request.uri = urlunparse(urlparse(request.uri)._replace(netloc="ipam.example.org"))
119-
return request

tests/docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
phpipam:
44
image: "phpipam/phpipam-www:${PHPIPAM_VERSION:-v1.4.4}"
55
ports:
6-
- "${PHPIPAM_PORT:-443}:443"
6+
- "${PHPIPAM_PORT:-8443}:443"
77
environment:
88
IPAM_DATABASE_HOST: "database"
99
IPAM_DATABASE_USER: "phpipam"

0 commit comments

Comments
 (0)