Skip to content

Commit

Permalink
Move to internal
Browse files Browse the repository at this point in the history
Signed-off-by: Raghav Kaul <raghavkaul+github@google.com>
  • Loading branch information
raghavkaul committed May 8, 2024
1 parent 5f1f4b2 commit b71528f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion clients/depsdev.go → clients/internal/depsdev.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package clients
package internal

import (
"context"
Expand Down
12 changes: 5 additions & 7 deletions e2e/depsdev_test.go → clients/internal/depsdev_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,37 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package e2e
package internal

import (
"context"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/ossf/scorecard/v5/clients"
)

var _ = Describe("E2E TEST: depsdevclient.GetProjectPackageVersions", func() {
var client clients.ProjectPackageClient
var client ProjectPackageClient

Context("E2E TEST: Confirm ProjectPackageClient works", func() {
It("Should receive a non-empty response from deps.dev for existing projects", func() {
client = clients.CreateDepsDevClient()
client = CreateDepsDevClient()
versions, err := client.GetProjectPackageVersions(
context.Background(), "github.com", "ossf/scorecard",
)
Expect(err).Should(BeNil())
Expect(len(versions.Versions)).Should(BeNumerically(">", 0))
})
It("Should error from deps.dev for nonexistent projects", func() {
client = clients.CreateDepsDevClient()
client = CreateDepsDevClient()
versions, err := client.GetProjectPackageVersions(
context.Background(), "github.com", "ossf/scorecard-E2E-TEST-DOES-NOT-EXIST",
)
Expect(err).ShouldNot(BeNil())
Expect(versions).Should(BeNil())
})
It("Should receive a non-empty response from deps.dev for existing projects", func() {
client = clients.CreateDepsDevClient()
client = CreateDepsDevClient()
versions, err := client.GetProjectPackageVersions(
context.Background(), "gitlab.com", "libtiff/libtiff",
)
Expand Down

0 comments on commit b71528f

Please sign in to comment.