-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CWS] use
modernc.org/sqlite
in CWS functional tests (#34702)
- Loading branch information
1 parent
fb1424d
commit e93e159
Showing
6 changed files
with
94 additions
and
10 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2016-present Datadog, Inc. | ||
|
||
//go:build trivy && functionaltests | ||
|
||
// Package trivy holds the scan components | ||
package trivy | ||
|
||
import ( | ||
// used to read RPM database | ||
// mattn/go-sqlite3 is currently not fully supported by our functional tests setup | ||
_ "modernc.org/sqlite" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2016-present Datadog, Inc. | ||
|
||
//go:build trivy && !functionaltests | ||
|
||
// Package trivy holds the scan components | ||
package trivy | ||
|
||
import ( | ||
// used to read RPM database | ||
"database/sql" | ||
|
||
"github.com/mattn/go-sqlite3" | ||
) | ||
|
||
// This is required to load sqlite based RPM databases | ||
func init() { | ||
// mattn/go-sqlite3 is only registering the sqlite3 driver | ||
// let's register the sqlite (no 3) driver as well | ||
sql.Register("sqlite", &sqlite3.SQLiteDriver{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters