update tests

pull/13547/head
Steven Powell 2022-02-03 11:27:37 -08:00
parent d01c77d816
commit d37359cf67
2 changed files with 8 additions and 3 deletions

View File

@ -68,9 +68,14 @@ func TestBetaReleasesJSON(t *testing.T) {
}
func checkReleases(t *testing.T, rs notify.Releases) {
for _, r := range rs {
for _, r := range rs.Releases {
fmt.Printf("Checking release: %s\n", r.Name)
for platform, sha := range r.Checksums {
checksums := map[string]string{
"darwin": r.Checksums.Darwin,
"linux": r.Checksums.Linux,
"windows": r.Checksums.Windows,
}
for platform, sha := range checksums {
fmt.Printf("Checking SHA for %s.\n", platform)
actualSha, err := getSHAFromURL(util.GetBinaryDownloadURL(r.Name, platform, runtime.GOARCH))
if err != nil {

View File

@ -95,7 +95,7 @@ func TestShouldCheckURLBetaVersion(t *testing.T) {
}
type URLHandlerCorrect struct {
releases Releases
releases []Release
}
func (h *URLHandlerCorrect) ServeHTTP(w http.ResponseWriter, r *http.Request) {