Skip to content

Commit

Permalink
specified that the environment is secretes
Browse files Browse the repository at this point in the history
  • Loading branch information
LordFarquaadtheCreator committed Sep 2, 2024
1 parent eb78c52 commit 2db0ff8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
test:
environment: secrets
runs-on: ubuntu-latest

steps:
Expand All @@ -24,6 +25,8 @@ jobs:

- name: Install dependencies
env:
USERNAME: ${{secrets.USERNAME}}
PASSWORD: ${{secrets.PASSWORD}}
POSTGRESQL_DB_USER: ${{ secrets.POSTGRESQL_DB_USER }}
POSTGRESQL_DB_PASSWORD: ${{ secrets.POSTGRESQL_DB_PASSWORD }}
POSTGRESQL_DB: ${{ secrets.POSTGRESQL_DB }}
Expand Down
12 changes: 4 additions & 8 deletions Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ def load_environment(self):
return True

except Exception as e:
self.failed = True
print("Failed load environment test")
print(e)
return False
print(user, password, db, db_host, db_pass, db_port, db_user)
raise e


class UnitTest(Test):
Expand Down Expand Up @@ -73,11 +71,9 @@ def delete_test(self):
try:
self.database.remove(self.uid_to_delete)
return True
except Exception as e:
except Exception:
self.failed = True
print("Deleting User Test Failed")
print(e)
return False
raise Exception("Deleting User Test Failed")

def get_test(self):
try:
Expand Down

0 comments on commit 2db0ff8

Please sign in to comment.