3 Commits
0.0.1 ... 0.0.3

Author SHA1 Message Date
f6550a28bb ok, now we use testpypi 2021-03-23 13:16:59 +01:00
b4a378d6e0 Merge remote-tracking branch 'origin/master' 2021-03-23 13:04:38 +01:00
7e356263b2 github actions test 2 :) 2021-03-23 13:02:43 +01:00
4 changed files with 40 additions and 4 deletions

View File

@@ -28,4 +28,4 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
twine upload --repository testpypi dist/*

View File

@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="vaultdatabaseengine-bvanroll", # Replace with your own username
name="vault-db-bvanroll", # Replace with your own username
version="0.0.1",
author="Beppe Vanrolleghem",
author_email="beppe.vanrolleghem@gmail.com",
@@ -20,7 +20,7 @@ setuptools.setup(
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
package_dir={"": "src"},
package_dir={"": "vaultdatabaseengine"},
packages=setuptools.find_packages(where="src"),
python_requires=">=3.6",
)
)

36
test/database.py Normal file
View File

@@ -0,0 +1,36 @@
import unittest
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import vaultdatabaseengine
class MyTestCase(unittest.TestCase):
def test_psql(self):
#TODO exec psql connect
print("hi")
test = vaultdatabaseengine.Database()
test.check_valid()
self.assertEqual(test.valid, False)
def test_psql_invalid_vault_url(self):
#TODO figure out how to fail unit test check
try:
vaultdatabaseengine.Database(dbname="sdfk", vault_url="localhost", vault_port=8200, token="bla")
except:
print("did it")
return
def test_psql_invalid_vault_port(self):
try:
vaultdatabaseengine.Database(dbname="sdfk", vault_url="localhost", vault_port="a", token="bla")
except:
return
def test_psql_valid(self):
print(vaultdatabaseengine.Database(dbname="psql", vault_url="http://localhost", token="s.GoR2nisHPeKU1vOaw9hZ5L7h").get_creds())
if __name__ == '__main__':
unittest.main()