|
@@ -58,7 +58,7 @@ func TestDaemonReloadAllowNondistributableArtifacts(t *testing.T) {
|
|
|
|
|
|
var err error
|
|
var err error
|
|
// Initialize daemon with some registries.
|
|
// Initialize daemon with some registries.
|
|
- daemon.RegistryService, err = registry.NewService(registry.ServiceOptions{
|
|
|
|
|
|
+ daemon.registryService, err = registry.NewService(registry.ServiceOptions{
|
|
AllowNondistributableArtifacts: []string{
|
|
AllowNondistributableArtifacts: []string{
|
|
"127.0.0.0/8",
|
|
"127.0.0.0/8",
|
|
"10.10.1.11:5000",
|
|
"10.10.1.11:5000",
|
|
@@ -95,7 +95,7 @@ func TestDaemonReloadAllowNondistributableArtifacts(t *testing.T) {
|
|
}
|
|
}
|
|
|
|
|
|
var actual []string
|
|
var actual []string
|
|
- serviceConfig := daemon.RegistryService.ServiceConfig()
|
|
|
|
|
|
+ serviceConfig := daemon.registryService.ServiceConfig()
|
|
for _, value := range serviceConfig.AllowNondistributableArtifactsCIDRs {
|
|
for _, value := range serviceConfig.AllowNondistributableArtifactsCIDRs {
|
|
actual = append(actual, value.String())
|
|
actual = append(actual, value.String())
|
|
}
|
|
}
|
|
@@ -113,7 +113,7 @@ func TestDaemonReloadMirrors(t *testing.T) {
|
|
muteLogs()
|
|
muteLogs()
|
|
|
|
|
|
var err error
|
|
var err error
|
|
- daemon.RegistryService, err = registry.NewService(registry.ServiceOptions{
|
|
|
|
|
|
+ daemon.registryService, err = registry.NewService(registry.ServiceOptions{
|
|
InsecureRegistries: []string{},
|
|
InsecureRegistries: []string{},
|
|
Mirrors: []string{
|
|
Mirrors: []string{
|
|
"https://mirror.test1.example.com",
|
|
"https://mirror.test1.example.com",
|
|
@@ -180,7 +180,7 @@ func TestDaemonReloadMirrors(t *testing.T) {
|
|
// mirrors should be valid, should be no error
|
|
// mirrors should be valid, should be no error
|
|
t.Fatal(err)
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
- registryService := daemon.RegistryService.ServiceConfig()
|
|
|
|
|
|
+ registryService := daemon.registryService.ServiceConfig()
|
|
|
|
|
|
if len(registryService.Mirrors) != len(value.after) {
|
|
if len(registryService.Mirrors) != len(value.after) {
|
|
t.Fatalf("Expected %d daemon mirrors %s while get %d with %s",
|
|
t.Fatalf("Expected %d daemon mirrors %s while get %d with %s",
|
|
@@ -215,7 +215,7 @@ func TestDaemonReloadInsecureRegistries(t *testing.T) {
|
|
|
|
|
|
var err error
|
|
var err error
|
|
// initialize daemon with existing insecure registries: "127.0.0.0/8", "10.10.1.11:5000", "10.10.1.22:5000"
|
|
// initialize daemon with existing insecure registries: "127.0.0.0/8", "10.10.1.11:5000", "10.10.1.22:5000"
|
|
- daemon.RegistryService, err = registry.NewService(registry.ServiceOptions{
|
|
|
|
|
|
+ daemon.registryService, err = registry.NewService(registry.ServiceOptions{
|
|
InsecureRegistries: []string{
|
|
InsecureRegistries: []string{
|
|
"127.0.0.0/8",
|
|
"127.0.0.0/8",
|
|
"10.10.1.11:5000",
|
|
"10.10.1.11:5000",
|
|
@@ -256,7 +256,7 @@ func TestDaemonReloadInsecureRegistries(t *testing.T) {
|
|
|
|
|
|
// After Reload, daemon.RegistryService will be changed which is useful
|
|
// After Reload, daemon.RegistryService will be changed which is useful
|
|
// for registry communication in daemon.
|
|
// for registry communication in daemon.
|
|
- registries := daemon.RegistryService.ServiceConfig()
|
|
|
|
|
|
+ registries := daemon.registryService.ServiceConfig()
|
|
|
|
|
|
// After Reload(), newConfig has come to registries.InsecureRegistryCIDRs and registries.IndexConfigs in daemon.
|
|
// After Reload(), newConfig has come to registries.InsecureRegistryCIDRs and registries.IndexConfigs in daemon.
|
|
// Then collect registries.InsecureRegistryCIDRs in dataMap.
|
|
// Then collect registries.InsecureRegistryCIDRs in dataMap.
|