5 Commits
0.0.2 ... 0.0.5

Author SHA1 Message Date
5fd9987486 versioning fix :) 2021-03-23 13:48:56 +01:00
ed19d7468f todooooo 2021-03-23 13:25:04 +01:00
7e6cfab28e toch geen verbose :) 2021-03-23 13:23:00 +01:00
d8886090f6 verbose upload 2021-03-23 13:20:53 +01:00
f6550a28bb ok, now we use testpypi 2021-03-23 13:16:59 +01:00
4 changed files with 44 additions and 3 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/*

3
TODO.md Normal file
View File

@@ -0,0 +1,3 @@
# TODO
1: add proper versioning (usage of tags during publish pipeline)

View File

@@ -4,8 +4,10 @@ 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="VaultDb", # Replace with your own username
version="0.0.1",
version_config=True,
setup_requires=['setuptools-git-versioning'],
author="Beppe Vanrolleghem",
author_email="beppe.vanrolleghem@gmail.com",
description="A vault creds reader for the vault database engine",
@@ -23,4 +25,4 @@ setuptools.setup(
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()