Repository: tetratelabs/getenvoy
Pull request #20 (2019-07-18 14:03:41)

Update to most recent manifest changes
Signed-off-by: Liam White <liam@tetrate.io>


Patch:
diff --git a/go.mod b/go.mod
index 91f7b37..9a2a1ff 100644
--- a/go.mod
+++ b/go.mod
@@ -6,5 +6,5 @@ require (
 	github.com/golang/protobuf v1.3.2
 	github.com/spf13/cobra v0.0.5
 	github.com/stretchr/testify v1.2.2
-	github.com/tetratelabs/getenvoy-package v0.0.0-20190718093948-35658f673f39
+	github.com/tetratelabs/getenvoy-package v0.0.0-20190718134531-9487f25b3273
 )
diff --git a/go.sum b/go.sum
index a58c811..a77091f 100644
--- a/go.sum
+++ b/go.sum
@@ -40,6 +40,8 @@ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1
 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/tetratelabs/getenvoy-package v0.0.0-20190718093948-35658f673f39 h1:ocOviUkYIJiidvsVmYjzzgm2Xy5WZ3EqrxXlnq3tm00=
 github.com/tetratelabs/getenvoy-package v0.0.0-20190718093948-35658f673f39/go.mod h1:IrGJ2YZz3+qia1dEU9GFg3QieuMUUwiJf5tjG8uhogg=
+github.com/tetratelabs/getenvoy-package v0.0.0-20190718134531-9487f25b3273 h1:Iy7CXZY65z7KY0z6LXh2V2urACTo8EDBbKqXf8O+mRU=
+github.com/tetratelabs/getenvoy-package v0.0.0-20190718134531-9487f25b3273/go.mod h1:IrGJ2YZz3+qia1dEU9GFg3QieuMUUwiJf5tjG8uhogg=
 github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
 github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
 golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=


Test patch:
diff --git a/pkg/manifest/fetch_test.go b/pkg/manifest/fetch_test.go
index bf751fe..6ea2d23 100644
--- a/pkg/manifest/fetch_test.go
+++ b/pkg/manifest/fetch_test.go
@@ -86,15 +86,15 @@ func goodManifest() *api.Manifest {
 				Name:          "standard",
 				FilterProfile: "standard",
 				Versions: map[string]*api.Version{
-					"1.10.0": {
-						Name: "1.10.0",
+					"1.11.0": {
+						Name: "1.11.0",
 						OperatingSystems: map[string]*api.OperatingSystem{
 							"Ubuntu": {
 								Name: api.OperatingSystemName_UBUNTU,
 								Builds: []*api.Build{
 									{
-										OperatingSystemVersion: "16.04",
-										DownloadLocationUrl:    "http://example.com",
+										OperatingSystemVersions: []string{"16.04", "18.04"},
+										DownloadLocationUrl:     "http://example.com",
 									},
 								},
 							},
@@ -102,8 +102,8 @@ func goodManifest() *api.Manifest {
 								Name: api.OperatingSystemName_MACOS,
 								Builds: []*api.Build{
 									{
-										OperatingSystemVersion: "10.14",
-										DownloadLocationUrl:    "http://example.com",
+										OperatingSystemVersions: []string{"10.14"},
+										DownloadLocationUrl:     "http://example.com",
 									},
 								},
 							},
@@ -111,8 +111,8 @@ func goodManifest() *api.Manifest {
 								Name: api.OperatingSystemName_CENTOS,
 								Builds: []*api.Build{
 									{
-										OperatingSystemVersion: "7",
-										DownloadLocationUrl:    "http://example.com",
+										OperatingSystemVersions: []string{"7"},
+										DownloadLocationUrl:     "http://example.com",
 									},
 								},
 							},
@@ -121,30 +121,12 @@ func goodManifest() *api.Manifest {
 					"nightly": {
 						Name: "nightly",
 						OperatingSystems: map[string]*api.OperatingSystem{
-							"Ubuntu": {
-								Name: api.OperatingSystemName_UBUNTU,
-								Builds: []*api.Build{
-									{
-										OperatingSystemVersion: "16.04",
-										DownloadLocationUrl:    "http://example.com",
-									},
-								},
-							},
-							"macOS": {
-								Name: api.OperatingSystemName_MACOS,
-								Builds: []*api.Build{
-									{
-										OperatingSystemVersion: "10.14",
-										DownloadLocationUrl:    "http://example.com",
-									},
-								},
-							},
 							"CentOS": {
 								Name: api.OperatingSystemName_CENTOS,
 								Builds: []*api.Build{
 									{
-										OperatingSystemVersion: "7",
-										DownloadLocationUrl:    "http://example.com",
+										OperatingSystemVersions: []string{"7"},
+										DownloadLocationUrl:     "http://example.com",
 									},
 								},
 							},
@@ -164,8 +146,8 @@ func goodManifest() *api.Manifest {
 								Name: api.OperatingSystemName_UBUNTU,
 								Builds: []*api.Build{
 									{
-										OperatingSystemVersion: "16.04",
-										DownloadLocationUrl:    "http://example.com",
+										OperatingSystemVersions: []string{"16.04"},
+										DownloadLocationUrl:     "http://example.com",
 									},
 								},
 							},
@@ -173,8 +155,8 @@ func goodManifest() *api.Manifest {
 								Name: api.OperatingSystemName_CENTOS,
 								Builds: []*api.Build{
 									{
-										OperatingSystemVersion: "7",
-										DownloadLocationUrl:    "http://example.com",
+										OperatingSystemVersions: []string{"7"},
+										DownloadLocationUrl:     "http://example.com",
 									},
 								},
 							},
diff --git a/pkg/manifest/testdata/list.golden b/pkg/manifest/testdata/list.golden
index 1272545..cb0c5a6 100644
--- a/pkg/manifest/testdata/list.golden
+++ b/pkg/manifest/testdata/list.golden
@@ -1,4 +1,4 @@
 FLAVOR                VERSION     AVAILABLE ON
-standard              nightly     CentOS macOS Ubuntu
-standard              1.10.0      CentOS macOS Ubuntu
+standard              nightly     CentOS
+standard              1.11.0      CentOS macOS Ubuntu
 standard-fips1402     1.10.0      CentOS Ubuntu
diff --git a/pkg/manifest/testdata/manifest.golden b/pkg/manifest/testdata/manifest.golden
index 5d79b7f..4cd637a 100644
--- a/pkg/manifest/testdata/manifest.golden
+++ b/pkg/manifest/testdata/manifest.golden
@@ -5,45 +5,28 @@
       "name": "standard",
       "filterProfile": "standard",
       "versions": {
-        "1.10.0": {
-          "name": "1.10.0",
+        "nightly": {
+          "name": "nightly",
           "operatingSystems": {
             "CentOS": {
               "name": "CENTOS",
               "builds": [
                 {
-                  "operatingSystemVersion": "7",
-                  "downloadLocationUrl": "http://example.com"
-                }
-              ]
-            },
-            "macOS": {
-              "name": "MACOS",
-              "builds": [
-                {
-                  "operatingSystemVersion": "10.14",
-                  "downloadLocationUrl": "http://example.com"
-                }
-              ]
-            },
-            "Ubuntu": {
-              "builds": [
-                {
-                  "operatingSystemVersion": "16.04",
+                  "operatingSystemVersions": ["7"],
                   "downloadLocationUrl": "http://example.com"
                 }
               ]
             }
           }
         },
-        "nightly": {
-          "name": "nightly",
+        "1.11.0": {
+          "name": "1.11.0",
           "operatingSystems": {
             "CentOS": {
               "name": "CENTOS",
               "builds": [
                 {
-                  "operatingSystemVersion": "7",
+                  "operatingSystemVersions": ["7"],
                   "downloadLocationUrl": "http://example.com"
                 }
               ]
@@ -52,7 +35,7 @@
               "name": "MACOS",
               "builds": [
                 {
-                  "operatingSystemVersion": "10.14",
+                  "operatingSystemVersions": ["10.14"],
                   "downloadLocationUrl": "http://example.com"
                 }
               ]
@@ -60,7 +43,7 @@
             "Ubuntu": {
               "builds": [
                 {
-                  "operatingSystemVersion": "16.04",
+                  "operatingSystemVersions": ["16.04", "18.04"],
                   "downloadLocationUrl": "http://example.com"
                 }
               ]
@@ -81,7 +64,7 @@
               "name": "CENTOS",
               "builds": [
                 {
-                  "operatingSystemVersion": "7",
+                  "operatingSystemVersions": ["7"],
                   "downloadLocationUrl": "http://example.com"
                 }
               ]
@@ -89,7 +72,7 @@
             "Ubuntu": {
               "builds": [
                 {
-                  "operatingSystemVersion": "16.04",
+                  "operatingSystemVersions": ["16.04"],
                   "downloadLocationUrl": "http://example.com"
                 }
               ]