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

Add SQL support to push test results to database file #60

Merged
merged 22 commits into from
Jun 23, 2023

Conversation

JudahNour
Copy link
Contributor

@JudahNour JudahNour commented Jun 7, 2023

-db_path flag takes in path to .sql or .db file. This flag necessitates use of flag -db_backend or environment variable DB_BACKEND (e.g. sqlite)

Alternatively, if db_path is not set, one may specify the environment variable DB_PATH. The flags hold precedence over the environment variables.

Sample Input JSON File:
Docker_Linux.zip

Sample Output .db File:
output_sqlite_summary.zip

Sample output db:
db_environment_tests_table
db_test_cases_table

Makefile Outdated Show resolved Hide resolved
cmd/gopogh/main.go Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
pkg/db/db.go Outdated Show resolved Hide resolved
pkg/report/report.go Outdated Show resolved Hide resolved
pkg/db/db.go Outdated Show resolved Hide resolved
pkg/models/models.go Outdated Show resolved Hide resolved
cmd/gopogh/main.go Outdated Show resolved Hide resolved
pkg/models/models.go Outdated Show resolved Hide resolved
pkg/models/models.go Outdated Show resolved Hide resolved
pkg/db/db.go Outdated Show resolved Hide resolved
pkg/db/db.go Show resolved Hide resolved
pkg/db/sqlite.go Outdated Show resolved Hide resolved
pkg/db/sqlite.go Outdated Show resolved Hide resolved
pkg/db/sqlite.go Outdated Show resolved Hide resolved
pkg/models/models.go Outdated Show resolved Hide resolved
cmd/gopogh/main.go Outdated Show resolved Hide resolved
pkg/report/report.go Outdated Show resolved Hide resolved
pkg/report/report.go Outdated Show resolved Hide resolved
pkg/db/sqlite.go Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
pkg/report/report.go Outdated Show resolved Hide resolved
pkg/db/db.go Outdated Show resolved Hide resolved
cmd/gopogh/main.go Outdated Show resolved Hide resolved
@@ -61,7 +61,7 @@ func main() {
os.Exit(1)
}

if *dbPath != "" || os.Getenv("DB_PATH") != "" {
if *dbPath != "" || os.Getenv("DB_PATH") != "" || *dbBackend != "" || os.Getenv("DB_BACKEND") != "" {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in a helper function that can read well

for example

if dbConfProvided() ...

@medyagh medyagh merged commit be2f780 into medyagh:master Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants