Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented pipeline for automated vulnerability fetching and processing #380

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class CommitDB:
class BackendDB:
def connect(self, connect_string):
raise NotImplementedError("Unimplemented")
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import pytest

from commitdb.postgres import PostgresCommitDB, parse_connect_string
from backenddb.postgres import PostgresBackendDB, parse_connect_string
from datamodel.commit import Commit


@pytest.fixture
def setupdb():
db = PostgresCommitDB("postgres", "example", "localhost", "5432", "postgres")
db = PostgresBackendDB("postgres", "example", "localhost", "5432", "postgres")
db.connect()
# db.reset()
return db


def test_save_lookup(setupdb: PostgresCommitDB):
def test_save_lookup(setupdb: PostgresBackendDB):
commit = Commit(
commit_id="42423b2423",
repository="https://fasfasdfasfasd.com/rewrwe/rwer",
Expand All @@ -37,7 +37,7 @@ def test_save_lookup(setupdb: PostgresCommitDB):
assert commit.commit_id == retrieved_commit.commit_id


def test_lookup_nonexisting(setupdb: PostgresCommitDB):
def test_lookup_nonexisting(setupdb: PostgresBackendDB):
result = setupdb.lookup(
"https://fasfasdfasfasd.com/rewrwe/rwer",
"42423b242342423b2423",
Expand Down
Loading
Loading