harbor/src/testing/chart_utility.go

341 lines
126 KiB
Go
Raw Normal View History

package testing
/**
* testing package provides utility functions for the UT tests
*/
import (
"encoding/json"
"net/http"
"strings"
hlog "github.com/goharbor/harbor/src/lib/log"
)
// MockChartRepoHandler is the backend chart server handler
var MockChartRepoHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
hlog.Infof("Incoming testing request: %s", r.RequestURI)
switch r.RequestURI {
case "/health":
if r.Method == http.MethodGet {
mockStatus := make(map[string]interface{})
mockStatus["health"] = true
data, _ := json.Marshal(mockStatus)
w.Write(data)
return
}
case "/repo1/index.yaml", "/library/index.yaml":
if r.Method == http.MethodGet {
w.Write([]byte(repo1IndexYaml))
return
}
case "/repo2/index.yaml":
if r.Method == http.MethodGet {
w.Write([]byte(repo2IndexYaml))
return
}
case "/not-existing-ns/index.yaml":
if r.Method == http.MethodGet {
w.WriteHeader(http.StatusNotFound)
return
}
case "/repo1/charts/harbor-0.2.0.tgz",
"/library/charts/harbor-0.2.0.tgz":
if r.Method == http.MethodGet {
w.Write(HelmChartContent)
return
}
case "/repo1/charts/harbor-0.2.0.tgz.prov",
"/library/charts/harbor-0.2.0.tgz.prov":
if r.Method == http.MethodGet {
w.Write(HelmChartProvContent)
return
}
case "/api/repo1/charts", "/api/library/charts":
if r.Method == http.MethodGet {
w.Write(ChartListContent)
return
}
case "/api/repo1/charts/harbor/0.2.0",
"/api/library/charts/harbor/0.2.0":
if r.Method == http.MethodGet {
w.Write([]byte(harborChartV))
return
}
if r.Method == http.MethodDelete {
w.WriteHeader(http.StatusOK)
return
}
case "/api/repo1/charts/harbor/1.0.0":
if r.Method == http.MethodGet {
w.WriteHeader(http.StatusNotFound)
w.Write([]byte("Not found"))
return
}
case "/api/repo1/charts/harbor/0.2.1",
"/api/library/charts/harbor/0.2.1":
if r.Method == http.MethodDelete {
w.WriteHeader(http.StatusOK)
return
}
case "/api/repo1/charts/harbor":
if r.Method == http.MethodGet {
w.Write([]byte(chartVersionsOfHarbor))
return
}
case "/api/library/charts/harbor":
if r.Method == http.MethodGet {
w.Write([]byte(chartVersionsOfHarbor))
return
}
if r.Method == http.MethodDelete {
w.WriteHeader(http.StatusOK)
}
case "/repo3/charts/harbor-0.8.1.tgz":
if r.Method == http.MethodGet {
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorized"))
return
}
case "/api/project_for_test_deletable/charts":
if r.Method == http.MethodGet {
w.Write([]byte("{}"))
return
}
default:
if r.Method == http.MethodGet {
if strings.HasSuffix(r.RequestURI, "/index.yaml") {
w.Write([]byte(repo2IndexYaml))
return
}
}
}
w.WriteHeader(http.StatusNotImplemented)
w.Write([]byte("not supported"))
})
// Mock content
var chartVersionsOfHarbor = `
[
{
"name": "harbor",
"home": "https://github.com/vmware/harbor",
"sources": [
"https://github.com/vmware/harbor/tree/master/contrib/helm/harbor"
],
"version": "0.2.1",
"description": "An Enterprise-class Docker Registry by VMware",
"keywords": [
"vmware",
"docker",
"registry",
"harbor"
],
"maintainers": [
{
"name": "Jesse Hu",
"email": "huh@vmware.com"
},
{
"name": "paulczar",
"email": "username.taken@gmail.com"
}
],
"engine": "gotpl",
"icon": "https://raw.githubusercontent.com/goharbor/website/master/docs/img/harbor_logo.png",
"appVersion": "1.5.0",
"urls": [
"charts/harbor-0.2.1.tgz"
],
"created": "2018-08-29T10:26:29.625749155Z",
"digest": "2538edf4ddb797af8e025f3bd6226270440110bbdb689bad48656a519a154236"
},
{
"name": "harbor",
"home": "https://github.com/vmware/harbor",
"sources": [
"https://github.com/vmware/harbor/tree/master/contrib/helm/harbor"
],
"version": "0.2.0",
"description": "An Enterprise-class Docker Registry by VMware",
"keywords": [
"vmware",
"docker",
"registry",
"harbor"
],
"maintainers": [
{
"name": "Jesse Hu",
"email": "huh@vmware.com"
},
{
"name": "paulczar",
"email": "username.taken@gmail.com"
}
],
"engine": "gotpl",
"icon": "https://raw.githubusercontent.com/goharbor/website/master/docs/img/harbor_logo.png",
"appVersion": "1.5.0",
"urls": [
"charts/harbor-0.2.0.tgz"
],
"created": "2018-08-29T10:26:21.141611102Z",
"digest": "fc8aae8dade9f0dfca12e9f1085081c49843d30a063a3fa7eb42497e3ceb277c"
}
]
`
var harborChartV = `
{
"name": "harbor",
"home": "https://github.com/goharbor/harbor",
"sources": [
"https://github.com/goharbor/harbor/tree/master/contrib/helm/harbor"
],
"version": "0.2.0",
"description": "An Enterprise-class Docker Registry by VMware",
"keywords": [
"vmware",
"docker",
"registry",
"harbor"
],
"maintainers": [
{
"name": "Jesse Hu",
"email": "huh@vmware.com"
},
{
"name": "paulczar",
"email": "username.taken@gmail.com"
}
],
"engine": "gotpl",
"icon": "https://raw.githubusercontent.com/goharbor/website/master/docs/img/harbor_logo.png",
"appVersion": "1.5.0",
"urls": [
"charts/harbor-0.2.0.tgz"
],
"created": "2018-07-05T19:45:09.077735818+08:00",
"digest": "758ae429f362200a7941c600c8112cc3122723b99ffa5713a0902902da9949ba"
}
`
var repo1IndexYaml = `
apiVersion: v1
entries:
harbor:
- appVersion: 1.5.0
created: "2018-07-05T19:45:09.077735818+08:00"
description: An Enterprise-class Docker Registry by VMware
digest: 758ae429f362200a7941c600c8112cc3122723b99ffa5713a0902902da9949ba
engine: gotpl
home: https://github.com/goharbor/harbor
icon: https://raw.githubusercontent.com/goharbor/website/master/docs/img/harbor_logo.png
keywords:
- vmware
- docker
- registry
- harbor
maintainers:
- email: huh@vmware.com
name: Jesse Hu
- email: username.taken@gmail.com
name: paulczar
name: harbor
sources:
- https://github.com/goharbor/harbor/tree/master/contrib/helm/harbor
urls:
- charts/harbor-0.2.0.tgz
version: 0.2.0
hello-helm:
- apiVersion: v1
appVersion: "1.0"
created: "2018-06-21T17:58:20.233212807+08:00"
description: A Helm chart for Kubernetes
digest: fab923eae3668e0d480e9dec110d814a7599789c327d907ae1afb7ab575dc60d
name: hello-helm
urls:
- charts/hello-helm-0.1.0.tgz
version: 0.1.0
myhelm:
- apiVersion: v1
appVersion: "1.2"
created: "2018-07-03T21:07:08.840026536+08:00"
description: A Helm chart for Kubernetes, juts a test package
digest: de0c7a2866df7582d0a8f1b68c4aa839023517bb548e552f0d4c3c358f1dddb4
name: myhelm
urls:
- charts/myhelm-1.2.0.tgz
version: 1.2.0
- apiVersion: v1
appVersion: "1.2"
created: "2018-07-03T21:01:11.959890639+08:00"
description: A Helm chart for Kubernetes, juts a test package
digest: 5994787296f89b798acfc14e88a1728b734d00c7d1b2ea6c01493dde7c411448
name: myhelm
urls:
- charts/myhelm-1.1.4.tgz
version: 1.1.4
generated: "2018-07-05T19:45:32+08:00"
`
var repo2IndexYaml = `
apiVersion: v1
entries:
harbor:
- appVersion: 1.5.0
created: "2018-07-05T19:48:20.169806519+08:00"
description: An Enterprise-class Docker Registry by VMware
digest: 758ae429f362200a7941c600c8112cc3122723b99ffa5713a0902902da9949ba
engine: gotpl
home: https://github.com/goharbor/harbor
icon: https://raw.githubusercontent.com/goharbor/website/master/docs/img/harbor_logo.png
keywords:
- vmware
- docker
- registry
- harbor
maintainers:
- email: huh@vmware.com
name: Jesse Hu
- email: username.taken@gmail.com
name: paulczar
name: harbor
sources:
- https://github.com/goharbor/harbor/tree/master/contrib/helm/harbor
urls:
- charts/harbor-0.2.0.tgz
version: 0.2.0
hello-helm:
- apiVersion: v1
appVersion: "1.2"
created: "2018-07-10T13:44:50.350222695+08:00"
description: A Helm chart for Kubernetes
digest: 0a0ab3eb95d634f7a19fcc0905149c2ead1812edbbd7e5ca815656d75553be4e
name: hello-helm
urls:
- charts/hello-helm-0.1.8.tgz
version: 0.1.8
- apiVersion: v1
appVersion: "1.0"
created: "2018-06-21T17:51:40.194375417+08:00"
description: A Helm chart for Kubernetes
digest: fab923eae3668e0d480e9dec110d814a7599789c327d907ae1afb7ab575dc60d
name: hello-helm
urls:
- charts/hello-helm-0.1.0.tgz
version: 0.1.0
generated: "2018-07-10T13:45:05+08:00"
`
// ChartListContent is the mock data of chart list
var ChartListContent = []byte{0x7b, 0x22, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x22, 0x2c, 0x22, 0x68, 0x6f, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x22, 0x2c, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2f, 0x68, 0x65, 0x6c, 0x6d, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x22, 0x5d, 0x2c, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x41, 0x6e, 0x20, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x2d, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x20, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x20, 0x62, 0x79, 0x20, 0x56, 0x4d, 0x77, 0x61, 0x72, 0x65, 0x22, 0x2c, 0x22, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x22, 0x2c, 0x22, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x22, 0x2c, 0x22, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x22, 0x2c, 0x22, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x22, 0x5d, 0x2c, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x4a, 0x65, 0x73, 0x73, 0x65, 0x20, 0x48, 0x75, 0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x22, 0x68, 0x75, 0x68, 0x40, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x7d, 0x2c, 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x70, 0x61, 0x75, 0x6c, 0x63, 0x7a, 0x61, 0x72, 0x22, 0x2c, 0x22, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x74, 0x61, 0x6b, 0x65, 0x6e, 0x40, 0x67, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x22, 0x3a, 0x22, 0x67, 0x6f, 0x74, 0x70, 0x6c, 0x22, 0x2c, 0x22, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x69, 0x6d, 0x67, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x2c, 0x22, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x31, 0x2e, 0x35, 0x2e, 0x30, 0x22, 0x2c, 0x22, 0x75, 0x72, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x63, 0x68, 0x61, 0x72, 0x74, 0x73, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x2d, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x2e, 0x74, 0x67, 0x7a, 0x22, 0x5d, 0x2c, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x3a, 0x22, 0x32, 0x30, 0x31, 0x38, 0x2d, 0x30, 0x37, 0x2d, 0x30, 0x35, 0x54, 0x31, 0x39, 0x3a, 0x34, 0x38, 0x3a, 0x32, 0x30, 0x2e, 0x31, 0x36, 0x39, 0x38, 0x30, 0x36, 0x35, 0x31, 0x39, 0x2b, 0x30, 0x38, 0x3a, 0x30, 0x30, 0x22, 0x2c, 0x22, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x22, 0x37, 0x35, 0x38, 0x61, 0x65, 0x34, 0x32, 0x39, 0x66, 0x33, 0x36, 0x32, 0x32, 0x30, 0x30, 0x61, 0x37, 0x39, 0x34, 0x31, 0x63, 0x36, 0x30, 0x30, 0x63, 0x38, 0x31, 0x31, 0x32, 0x63, 0x63, 0x33, 0x31, 0x32, 0x32, 0x37, 0x32, 0x33, 0x62, 0x39, 0x39, 0x66, 0x66, 0x61, 0x35, 0x37, 0x31, 0x33, 0x61, 0x30, 0x39, 0x30, 0x32, 0x39, 0x30, 0x32, 0x64, 0x61, 0x39, 0x39, 0x34, 0x39, 0x62, 0x61, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x68, 0x65, 0x6
// HelmChartProvContent is mock data of chart tgz...
var HelmChartProvContent = []byte{0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, 0x47, 0x50, 0x20, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x20, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x20, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x31, 0x2e, 0x35, 0x2e, 0x30, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x41, 0x6e, 0x20, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x2d, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x44, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x20, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x20, 0x62, 0x79, 0x20, 0x56, 0x4d, 0x77, 0x61, 0x72, 0x65, 0x0a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x3a, 0x20, 0x67, 0x6f, 0x74, 0x70, 0x6c, 0x0a, 0x68, 0x6f, 0x6d, 0x65, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x0a, 0x69, 0x63, 0x6f, 0x6e, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x72, 0x61, 0x77, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x75, 0x73, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x69, 0x6d, 0x67, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x6e, 0x67, 0x0a, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x3a, 0x0a, 0x2d, 0x20, 0x2d, 0x20, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x0a, 0x2d, 0x20, 0x2d, 0x20, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x0a, 0x2d, 0x20, 0x2d, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x0a, 0x2d, 0x20, 0x2d, 0x20, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x3a, 0x0a, 0x2d, 0x20, 0x2d, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x3a, 0x20, 0x68, 0x75, 0x68, 0x40, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x0a, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x4a, 0x65, 0x73, 0x73, 0x65, 0x20, 0x48, 0x75, 0x0a, 0x2d, 0x20, 0x2d, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x3a, 0x20, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x74, 0x61, 0x6b, 0x65, 0x6e, 0x40, 0x67, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x0a, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x70, 0x61, 0x75, 0x6c, 0x63, 0x7a, 0x61, 0x72, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x3a, 0x0a, 0x2d, 0x20, 0x2d, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x2f, 0x74, 0x72, 0x65, 0x65, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x2f, 0x68, 0x65, 0x6c, 0x6d, 0x2f, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x0a, 0x0a, 0x2e, 0x2e, 0x2e, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x72, 0x62, 0x6f, 0x72, 0x2d, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x2e, 0x74, 0x67, 0x7a, 0x3a, 0x20, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x3a, 0x37, 0x65, 0x63, 0x36, 0x31, 0x62, 0x65, 0x61, 0x38, 0x33, 0x61, 0x35, 0x36, 0x39, 0x61, 0x37, 0x65, 0x32, 0x34, 0x62, 0x31, 0x66, 0x36, 0x32, 0x37, 0x63, 0x64, 0x65, 0x62, 0x62, 0x61, 0x39, 0x35, 0x63, 0x36, 0x39, 0x62, 0x63, 0x30, 0x30, 0x35, 0x33, 0x37, 0x63, 0x63, 0x31, 0x34, 0x32, 0x31, 0x61, 0x39, 0x37, 0x36, 0x35, 0x31, 0x64, 0x38, 0x37, 0x30, 0x30, 0x35, 0x37, 0x35, 0x31, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, 0x47, 0x50, 0x20, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x0a, 0x77, 0x73, 0x44, 0x63, 0x42, 0x41,
// HelmChartContent is mock data of chart tgz...
var HelmChartContent = []byte{0x1f, 0x8b, 0x8, 0x14, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x29, 0x0, 0x2b, 0x61, 0x48, 0x52, 0x30, 0x63, 0x48, 0x4d, 0x36, 0x4c, 0x79, 0x39, 0x35, 0x62, 0x33, 0x56, 0x30, 0x64, 0x53, 0x35, 0x69, 0x5a, 0x53, 0x39, 0x36, 0x4f, 0x56, 0x56, 0x36, 0x4d, 0x57, 0x6c, 0x6a, 0x61, 0x6e, 0x64, 0x79, 0x54, 0x51, 0x6f, 0x3d, 0x48, 0x65, 0x6c, 0x6d, 0x0, 0xec, 0xfd, 0x7b, 0x77, 0xe2, 0x38, 0xb3, 0x28, 0xe, 0xef, 0xbf, 0xf9, 0x14, 0x7a, 0xd3, 0xe7, 0x9c, 0x99, 0xee, 0x34, 0x60, 0xee, 0x97, 0x77, 0xcf, 0xde, 0xf, 0xb7, 0x0, 0xe1, 0x1a, 0x2e, 0x49, 0xc8, 0x9c, 0x59, 0x89, 0xb0, 0x5, 0x28, 0xd8, 0x96, 0x63, 0xd9, 0x10, 0x32, 0x3d, 0xe7, 0xb3, 0xff, 0x96, 0x24, 0xdb, 0x18, 0x30, 0x21, 0xf7, 0x9e, 0x79, 0x76, 0xb4, 0xd6, 0x4c, 0x7, 0x5b, 0x55, 0x2a, 0xc9, 0x55, 0xa5, 0x52, 0xa9, 0x54, 0x9a, 0x41, 0x73, 0x4c, 0xcc, 0x68, 0x69, 0x6, 0x4d, 0x2b, 0xb2, 0x82, 0x9a, 0xfa, 0x1f, 0x6f, 0x5f, 0x24, 0x49, 0x92, 0x32, 0xa9, 0x14, 0xff, 0x57, 0x92, 0xa4, 0xed, 0x7f, 0xa5, 0x4c, 0x2c, 0xe3, 0xfd, 0xcd, 0x9f, 0xc7, 0xe2, 0x89, 0x44, 0xe6, 0x3f, 0xc0, 0x3b, 0x90, 0xb2, 0x5b, 0x6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