Files
kairos-agent/pkg/github/releases_test.go
Itxaka d9c3ba5915 robot: Fix release tests (#1332)
Looks like we only get a small subset of the releases so we cant check
for a specific number in the list that we get

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-04-21 11:04:03 +02:00

26 lines
644 B
Go

package github_test
import (
"context"
"testing"
"github.com/kairos-io/kairos/v2/pkg/github"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestReleases(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Releases Suite")
}
var _ = Describe("Releases", func() {
It("can find the proper releases in order", func() {
releases, err := github.FindReleases(context.Background(), "", "kairos-io/kairos")
Expect(err).ToNot(HaveOccurred())
Expect(len(releases)).To(BeNumerically(">", 0))
// Expect the first one to be greater than the last one
Expect(releases[0].GreaterThan(releases[len(releases)-1]))
})
})