mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Docker CI test (#5544)
* Docker CI test * Pin setuptools version * Don't run docker build on pull-request
This commit is contained in:
parent
17d227443d
commit
2be2ea4f8f
2
.github/workflows/docker.yaml
vendored
2
.github/workflows/docker.yaml
vendored
@ -60,7 +60,7 @@ jobs:
|
|||||||
docker-compose run inventree-dev-server invoke update
|
docker-compose run inventree-dev-server invoke update
|
||||||
docker-compose run inventree-dev-server invoke setup-dev
|
docker-compose run inventree-dev-server invoke setup-dev
|
||||||
docker-compose up -d
|
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
|
docker-compose run inventree-dev-server invoke wait
|
||||||
- name: Check Data Directory
|
- name: Check Data Directory
|
||||||
# The following file structure should have been created by the docker image
|
# The following file structure should have been created by the docker image
|
||||||
|
@ -41,6 +41,8 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
|
|||||||
expected_code=201,
|
expected_code=201,
|
||||||
).data
|
).data
|
||||||
|
|
||||||
|
print("A:", data)
|
||||||
|
|
||||||
self.assertEqual(data['success'], True)
|
self.assertEqual(data['success'], True)
|
||||||
|
|
||||||
# valid - github url
|
# valid - github url
|
||||||
@ -52,6 +54,9 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
|
|||||||
},
|
},
|
||||||
expected_code=201,
|
expected_code=201,
|
||||||
).data
|
).data
|
||||||
|
|
||||||
|
print("B:", data)
|
||||||
|
|
||||||
self.assertEqual(data['success'], True)
|
self.assertEqual(data['success'], True)
|
||||||
|
|
||||||
# valid - github url and package name
|
# valid - github url and package name
|
||||||
@ -66,6 +71,8 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
|
|||||||
).data
|
).data
|
||||||
self.assertEqual(data['success'], True)
|
self.assertEqual(data['success'], True)
|
||||||
|
|
||||||
|
print("C:", data)
|
||||||
|
|
||||||
# invalid tries
|
# invalid tries
|
||||||
# no input
|
# no input
|
||||||
self.post(url, {}, expected_code=400)
|
self.post(url, {}, expected_code=400)
|
||||||
@ -75,6 +82,8 @@ class PluginDetailAPITest(PluginMixin, InvenTreeAPITestCase):
|
|||||||
'confirm': True,
|
'confirm': True,
|
||||||
}, expected_code=400).data
|
}, expected_code=400).data
|
||||||
|
|
||||||
|
print("D:", data)
|
||||||
|
|
||||||
self.assertEqual(data['url'][0].title().upper(), self.MSG_NO_PKG.upper())
|
self.assertEqual(data['url'][0].title().upper(), self.MSG_NO_PKG.upper())
|
||||||
self.assertEqual(data['packagename'][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,
|
'confirm': False,
|
||||||
}, expected_code=400).data
|
}, expected_code=400).data
|
||||||
|
|
||||||
|
print("E:", data)
|
||||||
|
|
||||||
self.assertEqual(data['confirm'][0].title().upper(), 'Installation not confirmed'.upper())
|
self.assertEqual(data['confirm'][0].title().upper(), 'Installation not confirmed'.upper())
|
||||||
|
|
||||||
def test_plugin_activate(self):
|
def test_plugin_activate(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user