update to remove unused test

commit will be squashed before merge
This commit is contained in:
Marek Counts
2019-06-13 09:57:17 -04:00
parent c8045049f3
commit bf376e863c

View File

@@ -19,7 +19,6 @@ package util
import ( import (
"errors" "errors"
"fmt" "fmt"
"net/http"
"path" "path"
"strings" "strings"
"testing" "testing"
@@ -117,19 +116,18 @@ func TestValidConvenientForUserVersion(t *testing.T) {
func TestVersionFromNetwork(t *testing.T) { func TestVersionFromNetwork(t *testing.T) {
type T struct { type T struct {
Content string Content string
Status int
Expected string Expected string
ErrorExpected bool ErrorExpected bool
} }
cases := map[string]T{ cases := map[string]T{
"stable": {"stable-1", http.StatusOK, "v1.4.6", false}, // recursive pointer to stable-1 "stable": {"stable-1", "v1.4.6", false}, // recursive pointer to stable-1
"stable-1": {"v1.4.6", http.StatusOK, "v1.4.6", false}, "stable-1": {"v1.4.6", "v1.4.6", false},
"stable-1.3": {"v1.3.10", http.StatusOK, "v1.3.10", false}, "stable-1.3": {"v1.3.10", "v1.3.10", false},
"latest": {"v1.6.0-alpha.0", http.StatusOK, "v1.6.0-alpha.0", false}, "latest": {"v1.6.0-alpha.0", "v1.6.0-alpha.0", false},
"latest-1.3": {"v1.3.11-beta.0", http.StatusOK, "v1.3.11-beta.0", false}, "latest-1.3": {"v1.3.11-beta.0", "v1.3.11-beta.0", false},
"empty": {"", http.StatusOK, "", true}, "empty": {"", "", true},
"garbage": {"<?xml version='1.0'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message></Error>", http.StatusOK, "", true}, "garbage": {"<?xml version='1.0'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message></Error>", "", true},
"unknown": {"The requested URL was not found on this server.", http.StatusNotFound, "", true}, "unknown": {"The requested URL was not found on this server.", "", true},
} }
fileFetcher := func(url string, timeout time.Duration) (string, error) { fileFetcher := func(url string, timeout time.Duration) (string, error) {