Docker CI test (#5544)

* Docker CI test

* Pin setuptools version

* Don't run docker build on pull-request
This commit is contained in:
Oliver 2023-09-15 22:44:54 +10:00 committed by GitHub
parent 17d227443d
commit 2be2ea4f8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -60,7 +60,7 @@ jobs:
docker-compose run inventree-dev-server invoke update
docker-compose run inventree-dev-server invoke setup-dev
docker-compose up -d
docker-compose run inventree-dev-server pip install --upgrade setuptools
docker-compose run inventree-dev-server pip install setuptools==68.1.2
docker-compose run inventree-dev-server invoke wait
- name: Check Data Directory
# The following file structure should have been created by the docker image

View File

@ -41,6 +41,8 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
expected_code=201,
).data
print("A:", data)
self.assertEqual(data['success'], True)
# valid - github url
@ -52,6 +54,9 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
},
expected_code=201,
).data
print("B:", data)
self.assertEqual(data['success'], True)
# valid - github url and package name
@ -66,6 +71,8 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
).data
self.assertEqual(data['success'], True)
print("C:", data)
# invalid tries
# no input
self.post(url, {}, expected_code=400)
@ -75,6 +82,8 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
'confirm': True,
}, expected_code=400).data
print("D:", data)
self.assertEqual(data['url'][0].title().upper(), self.MSG_NO_PKG.upper())
self.assertEqual(data['packagename'][0].title().upper(), self.MSG_NO_PKG.upper())
@ -88,6 +97,8 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
'confirm': False,
}, expected_code=400).data
print("E:", data)
self.assertEqual(data['confirm'][0].title().upper(), 'Installation not confirmed'.upper())
def test_plugin_activate(self):