test(k8s): use test-db for k8s integration tests (#6222)

This commit is contained in:
DmitriyLewen
2024-02-28 22:17:59 +06:00
committed by GitHub
parent 4f70468bdd
commit c1d26ec334

View File

@@ -21,11 +21,15 @@ import (
// "mage test:k8s" will run this test. // "mage test:k8s" will run this test.
func TestK8s(t *testing.T) { func TestK8s(t *testing.T) {
// Set up testing DB
cacheDir := initDB(t)
t.Run("misconfig and vulnerability scan", func(t *testing.T) { t.Run("misconfig and vulnerability scan", func(t *testing.T) {
// Set up the output file // Set up the output file
outputFile := filepath.Join(t.TempDir(), "output.json") outputFile := filepath.Join(t.TempDir(), "output.json")
osArgs := []string{ osArgs := []string{
"--cache-dir",
cacheDir,
"k8s", "k8s",
"cluster", "cluster",
"--report", "--report",