blob: 98c253864a1a6db3467579847947b704d1dd9ed9 [file] [log] [blame]
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package worker
import (
"context"
"testing"
"cloud.google.com/go/storage"
test "golang.org/x/pkgsite-metrics/internal/testing"
)
func TestIntegrationAllVulns(t *testing.T) {
test.NeedsIntegrationEnv(t)
ctx := context.Background()
c, err := storage.NewClient(ctx)
if err != nil {
t.Fatal(err)
}
bucket := c.Bucket("go-vulndb")
if bucket == nil {
t.Fatal("failed to create go-vulndb bucket")
}
es, err := allVulnerabilities(ctx, bucket)
if err != nil {
t.Fatal(err)
}
if len(es) == 0 {
t.Fatal("want some vulnerabilities; got none")
}
}