registry: un-skip some tests that don't require root
These tests seem to be running fine without being root, so let's not skip them. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
de27973538
commit
b7d29c1e23
2 changed files with 0 additions and 7 deletions
|
@ -1,14 +1,12 @@
|
|||
package registry // import "github.com/docker/docker/registry"
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/distribution/reference"
|
||||
"github.com/docker/docker/api/types/registry"
|
||||
"gotest.tools/v3/assert"
|
||||
is "gotest.tools/v3/assert/cmp"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
|
||||
func TestParseRepositoryInfo(t *testing.T) {
|
||||
|
@ -381,7 +379,6 @@ func TestNewIndexInfo(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestMirrorEndpointLookup(t *testing.T) {
|
||||
skip.If(t, os.Getuid() != 0, "skipping test that requires root")
|
||||
containsMirror := func(endpoints []APIEndpoint) bool {
|
||||
for _, pe := range endpoints {
|
||||
if pe.URL.Host == "my.mirror" {
|
||||
|
|
|
@ -3,18 +3,15 @@ package registry // import "github.com/docker/docker/registry"
|
|||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/api/types/registry"
|
||||
"gotest.tools/v3/assert"
|
||||
is "gotest.tools/v3/assert/cmp"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
|
||||
func TestV1EndpointPing(t *testing.T) {
|
||||
skip.If(t, os.Getuid() != 0, "skipping test that requires root")
|
||||
testPing := func(index *registry.IndexInfo, expectedStandalone bool, assertMessage string) {
|
||||
ep, err := newV1Endpoint(index, nil)
|
||||
if err != nil {
|
||||
|
@ -34,7 +31,6 @@ func TestV1EndpointPing(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestV1Endpoint(t *testing.T) {
|
||||
skip.If(t, os.Getuid() != 0, "skipping test that requires root")
|
||||
// Simple wrapper to fail test if err != nil
|
||||
expandEndpoint := func(index *registry.IndexInfo) *v1Endpoint {
|
||||
endpoint, err := newV1Endpoint(index, nil)
|
||||
|
|
Loading…
Add table
Reference in a new issue