Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
with:
python-version: '3.x'
- name: Prepare test environment
env:
PHPIPAM_URL: ${{ secrets.PHPIPAM_URL }}
PHPIPAM_APPID: ${{ secrets.PHPIPAM_APPID }}
PHPIPAM_USERNAME: ${{ secrets.PHPIPAM_USERNAME }}
PHPIPAM_PASSWORD: ${{ secrets.PHPIPAM_PASSWORD }}
run: |
python -m pip install --upgrade pip
make test-setup
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ test-setup: | tests/vars/server.yml
pip install --upgrade -r requirements-dev.txt

tests/vars/server.yml:
cp $@.example $@
@echo "Please configure $@ to point to your phpIPAM instance for recording."
sed -e "s#~~url~~#$(PHPIPAM_URL)#" -e "s#~~app_id~~#$(PHPIPAM_APPID)#" -e "s#~~username~~#$(PHPIPAM_USERNAME)#" -e "s#~~password~~#$(PHPIPAM_PASSWORD)#" $@.example > $@

test-all:
coverage run -m pytest tests/test_cases/* -v
Expand Down
8 changes: 4 additions & 4 deletions tests/vars/server.yml.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Parameter for all tests
url: 'https://ipam.example.com'
app_id: my_app
username: user
password: p455w0rd
url: ~~url~~
app_id: ~~app_id~~
username: ~~username~~
password: ~~password~~