Update docker integration tests to use golem

Use registry example from golem repository.
Use the golem test runner for the docker integration environment

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2016-03-30 13:55:24 -07:00
parent f4b6fc8d68
commit 17f7f60d77
62 changed files with 1702 additions and 384 deletions

View file

@ -2,7 +2,6 @@ FROM nginx:1.9
COPY nginx.conf /etc/nginx/nginx.conf
COPY registry.conf /etc/nginx/conf.d/registry.conf
COPY docker-registry.conf /etc/nginx/docker-registry.conf
COPY docker-registry-v2.conf /etc/nginx/docker-registry-v2.conf
COPY registry-noauth.conf /etc/nginx/registry-noauth.conf
COPY registry-basic.conf /etc/nginx/registry-basic.conf

View file

@ -1,7 +0,0 @@
proxy_pass http://docker-registry;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Authorization ""; # see https://github.com/docker/docker-registry/issues/170
proxy_read_timeout 900;

View file

@ -25,3 +25,37 @@ http {
include /etc/nginx/conf.d/*.conf;
}
# Setup TCP proxies
stream {
# Malevolent proxy
server {
listen 6666;
proxy_pass malevolent:6666;
}
# Registry configured for token server
server {
listen 5554;
listen 5555;
proxy_pass registryv2token:5000;
}
# Token server
server {
listen 5556;
proxy_pass tokenserver:5556;
}
# Registry configured for token server with oauth
server {
listen 5557;
listen 5558;
proxy_pass registryv2tokenoauth:5000;
}
# Token server with oauth
server {
listen 5559;
proxy_pass tokenserveroauth:5559;
}
}

View file

@ -6,8 +6,3 @@ location /v2/ {
add_header 'Docker-Distribution-Api-Version' 'registry/2.0' always;
include docker-registry-v2.conf;
}
location / {
auth_basic "registry.localhost";
auth_basic_user_file test.passwd;
include docker-registry.conf;
}

View file

@ -3,6 +3,3 @@ chunked_transfer_encoding on;
location /v2/ {
include docker-registry-v2.conf;
}
location / {
include docker-registry.conf;
}

View file

@ -1,8 +1,4 @@
# Docker registry proxy for api versions 1 and 2
upstream docker-registry {
server registryv1:5000;
}
# Docker registry proxy for api version 2
upstream docker-registry-v2 {
server registryv2:5000;
@ -28,26 +24,6 @@ server {
include docker-registry-v2.conf;
}
location / {
include docker-registry.conf;
}
}
# No client auth or TLS (V1 Only)
server {
listen 5001;
server_name localhost;
# disable any limits to avoid HTTP 413 for large image uploads
client_max_body_size 0;
# required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486)
chunked_transfer_encoding on;
location / {
include docker-registry.conf;
}
}
# No client auth or TLS (V2 Only)
@ -66,38 +42,6 @@ server {
}
}
# TLS localhost (V1 Only)
server {
listen 5011;
server_name localhost;
ssl on;
ssl_certificate /etc/nginx/ssl/registry-ca+localhost-cert.pem;
ssl_certificate_key /etc/nginx/ssl/registry-ca+localhost-key.pem;
client_max_body_size 0;
chunked_transfer_encoding on;
location / {
include docker-registry.conf;
}
}
# TLS localregistry (V1 Only)
server {
listen 5011;
server_name localregistry;
ssl on;
ssl_certificate /etc/nginx/ssl/registry-ca+localregistry-cert.pem;
ssl_certificate_key /etc/nginx/ssl/registry-ca+localregistry-key.pem;
client_max_body_size 0;
chunked_transfer_encoding on;
location / {
include docker-registry.conf;
}
}
# TLS Configuration chart
# Username/Password: testuser/passpassword
# | ca | client | basic | notes