mirror of
https://github.com/clearlinux/rkt.git
synced 2026-08-19 05:27:23 +00:00
Godeps: bump appc to v0.5.1
This commit is contained in:
Generated
+12
-12
@@ -25,33 +25,33 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/appc/spec/aci",
|
||||
"Comment": "v0.5.0-10-g3fa4247",
|
||||
"Rev": "3fa4247af87697784d812b8b68efd809fcbee33e"
|
||||
"Comment": "v0.5.1",
|
||||
"Rev": "9a448f73b7fa765a60eade4bcca41e18bfe613aa"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/appc/spec/actool",
|
||||
"Comment": "v0.5.0-10-g3fa4247",
|
||||
"Rev": "3fa4247af87697784d812b8b68efd809fcbee33e"
|
||||
"Comment": "v0.5.1",
|
||||
"Rev": "9a448f73b7fa765a60eade4bcca41e18bfe613aa"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/appc/spec/discovery",
|
||||
"Comment": "v0.5.0-10-g3fa4247",
|
||||
"Rev": "3fa4247af87697784d812b8b68efd809fcbee33e"
|
||||
"Comment": "v0.5.1",
|
||||
"Rev": "9a448f73b7fa765a60eade4bcca41e18bfe613aa"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/appc/spec/pkg/acirenderer",
|
||||
"Comment": "v0.5.0-10-g3fa4247",
|
||||
"Rev": "3fa4247af87697784d812b8b68efd809fcbee33e"
|
||||
"Comment": "v0.5.1",
|
||||
"Rev": "9a448f73b7fa765a60eade4bcca41e18bfe613aa"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/appc/spec/pkg/tarheader",
|
||||
"Comment": "v0.5.0-10-g3fa4247",
|
||||
"Rev": "3fa4247af87697784d812b8b68efd809fcbee33e"
|
||||
"Comment": "v0.5.1",
|
||||
"Rev": "9a448f73b7fa765a60eade4bcca41e18bfe613aa"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/appc/spec/schema",
|
||||
"Comment": "v0.5.0-10-g3fa4247",
|
||||
"Rev": "3fa4247af87697784d812b8b68efd809fcbee33e"
|
||||
"Comment": "v0.5.1",
|
||||
"Rev": "9a448f73b7fa765a60eade4bcca41e18bfe613aa"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/camlistore/lock",
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ func newTestACI(usedotslash bool) (*os.File, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
manifestBody := `{"acKind":"ImageManifest","acVersion":"0.5.0","name":"example.com/app"}`
|
||||
manifestBody := `{"acKind":"ImageManifest","acVersion":"0.5.1","name":"example.com/app"}`
|
||||
|
||||
gw := gzip.NewWriter(tf)
|
||||
tw := tar.NewWriter(gw)
|
||||
|
||||
+8
-6
@@ -6,6 +6,8 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/rocket/Godeps/_workspace/src/github.com/appc/spec/schema/types"
|
||||
)
|
||||
|
||||
func fakeHTTPGet(filename string, failures int) func(uri string) (*http.Response, error) {
|
||||
@@ -65,7 +67,7 @@ func TestDiscoverEndpoints(t *testing.T) {
|
||||
true,
|
||||
App{
|
||||
Name: "example.com/myapp",
|
||||
Labels: map[string]string{
|
||||
Labels: map[types.ACName]string{
|
||||
"version": "1.0.0",
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
@@ -88,7 +90,7 @@ func TestDiscoverEndpoints(t *testing.T) {
|
||||
true,
|
||||
App{
|
||||
Name: "example.com/myapp/foobar",
|
||||
Labels: map[string]string{
|
||||
Labels: map[types.ACName]string{
|
||||
"version": "1.0.0",
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
@@ -111,7 +113,7 @@ func TestDiscoverEndpoints(t *testing.T) {
|
||||
false,
|
||||
App{
|
||||
Name: "example.com/myapp/foobar/bazzer",
|
||||
Labels: map[string]string{
|
||||
Labels: map[types.ACName]string{
|
||||
"version": "1.0.0",
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
@@ -128,7 +130,7 @@ func TestDiscoverEndpoints(t *testing.T) {
|
||||
true,
|
||||
App{
|
||||
Name: "example.com/myapp",
|
||||
Labels: map[string]string{
|
||||
Labels: map[types.ACName]string{
|
||||
"version": "1.0.0",
|
||||
},
|
||||
},
|
||||
@@ -147,7 +149,7 @@ func TestDiscoverEndpoints(t *testing.T) {
|
||||
false,
|
||||
App{
|
||||
Name: "example.com/myapp",
|
||||
Labels: map[string]string{},
|
||||
Labels: map[types.ACName]string{},
|
||||
},
|
||||
[]ACIEndpoint{
|
||||
ACIEndpoint{
|
||||
@@ -163,7 +165,7 @@ func TestDiscoverEndpoints(t *testing.T) {
|
||||
false,
|
||||
App{
|
||||
Name: "example.com/myapp",
|
||||
Labels: map[string]string{
|
||||
Labels: map[types.ACName]string{
|
||||
"name": "labelcalledname",
|
||||
"version": "1.0.0",
|
||||
},
|
||||
|
||||
+10
-6
@@ -10,12 +10,12 @@ import (
|
||||
|
||||
type App struct {
|
||||
Name types.ACName
|
||||
Labels map[string]string
|
||||
Labels map[types.ACName]string
|
||||
}
|
||||
|
||||
func NewApp(name string, labels map[string]string) (*App, error) {
|
||||
func NewApp(name string, labels map[types.ACName]string) (*App, error) {
|
||||
if labels == nil {
|
||||
labels = make(map[string]string, 0)
|
||||
labels = make(map[types.ACName]string, 0)
|
||||
}
|
||||
acn, err := types.NewACName(name)
|
||||
if err != nil {
|
||||
@@ -35,7 +35,7 @@ func NewApp(name string, labels map[string]string) (*App, error) {
|
||||
func NewAppFromString(app string) (*App, error) {
|
||||
var (
|
||||
name string
|
||||
labels map[string]string
|
||||
labels map[types.ACName]string
|
||||
)
|
||||
|
||||
app = strings.Replace(app, ":", ",version=", -1)
|
||||
@@ -44,7 +44,7 @@ func NewAppFromString(app string) (*App, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
labels = make(map[string]string, 0)
|
||||
labels = make(map[types.ACName]string, 0)
|
||||
for key, val := range v {
|
||||
if len(val) > 1 {
|
||||
return nil, fmt.Errorf("label %s with multiple values %q", key, val)
|
||||
@@ -53,7 +53,11 @@ func NewAppFromString(app string) (*App, error) {
|
||||
name = val[0]
|
||||
continue
|
||||
}
|
||||
labels[key] = val[0]
|
||||
labelName, err := types.NewACName(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
labels[*labelName] = val[0]
|
||||
}
|
||||
a, err := NewApp(name, labels)
|
||||
if err != nil {
|
||||
|
||||
+4
-2
@@ -3,6 +3,8 @@ package discovery
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/rocket/Godeps/_workspace/src/github.com/appc/spec/schema/types"
|
||||
)
|
||||
|
||||
func TestNewAppFromString(t *testing.T) {
|
||||
@@ -17,7 +19,7 @@ func TestNewAppFromString(t *testing.T) {
|
||||
|
||||
&App{
|
||||
Name: "example.com/reduce-worker",
|
||||
Labels: map[string]string{
|
||||
Labels: map[types.ACName]string{
|
||||
"version": "1.0.0",
|
||||
},
|
||||
},
|
||||
@@ -28,7 +30,7 @@ func TestNewAppFromString(t *testing.T) {
|
||||
|
||||
&App{
|
||||
Name: "example.com/reduce-worker",
|
||||
Labels: map[string]string{
|
||||
Labels: map[types.ACName]string{
|
||||
"channel": "alpha",
|
||||
"label": "value",
|
||||
},
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ func TestEmptyApp(t *testing.T) {
|
||||
imj := `
|
||||
{
|
||||
"acKind": "ImageManifest",
|
||||
"acVersion": "0.5.0",
|
||||
"acVersion": "0.5.1",
|
||||
"name": "example.com/test"
|
||||
}
|
||||
`
|
||||
|
||||
+11
@@ -91,3 +91,14 @@ func (l Labels) Get(name string) (val string, ok bool) {
|
||||
}
|
||||
return "", false
|
||||
}
|
||||
|
||||
func LabelsFromMap(labelsMap map[ACName]string) (Labels, error) {
|
||||
labels := Labels{}
|
||||
for n, v := range labelsMap {
|
||||
labels = append(labels, Label{Name: n, Value: v})
|
||||
}
|
||||
if err := labels.assertValid(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return labels, nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ const (
|
||||
// version represents the canonical version of the appc spec and tooling.
|
||||
// For now, the schema and tooling is coupled with the spec itself, so
|
||||
// this must be kept in sync with the VERSION file in the root of the repo.
|
||||
version string = "0.5.0+git"
|
||||
version string = "0.5.1"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user