Add support for layers from foreign sources

This will be used to support downloading Windows base layers from
Microsoft URLs.

Signed-off-by: John Starks <jostarks@microsoft.com>
This commit is contained in:
John Starks 2016-05-14 14:49:08 -07:00
parent bb841197c2
commit dd66aabeba
5 changed files with 165 additions and 16 deletions

View file

@ -1,6 +1,7 @@
package proxy
import (
"reflect"
"sort"
"sync"
"testing"
@ -92,7 +93,7 @@ func TestGet(t *testing.T) {
t.Fatalf("Expected 1 auth challenge call, got %#v", proxyTags.authChallenger)
}
if d != remoteDesc {
if !reflect.DeepEqual(d, remoteDesc) {
t.Fatal("unable to get put tag")
}
@ -101,7 +102,7 @@ func TestGet(t *testing.T) {
t.Fatal("remote tag not pulled into store")
}
if local != remoteDesc {
if !reflect.DeepEqual(local, remoteDesc) {
t.Fatalf("unexpected descriptor pulled through")
}
@ -121,7 +122,7 @@ func TestGet(t *testing.T) {
t.Fatalf("Expected 2 auth challenge calls, got %#v", proxyTags.authChallenger)
}
if d != newRemoteDesc {
if !reflect.DeepEqual(d, newRemoteDesc) {
t.Fatal("unable to get put tag")
}