This repository has been archived by the owner on Oct 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate unit test and integration tests
Skip tests that require environement sutup (e.g. k8s cluster) when running tests in short mode. Add an additional 'integarion' target to Makefile for running those tests. Signed-off-by: Pablo Chacin <pchacin@suse.com>
- Loading branch information
Pablo Chacin
committed
Nov 21, 2018
1 parent
f359756
commit 063bb9b
Showing
8 changed files
with
91 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,26 @@ | ||
module github.com/kubic-project/registries-operator | ||
|
||
require ( | ||
cloud.google.com/go v0.30.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/docker/distribution v2.6.2+incompatible // indirect | ||
github.com/ghodss/yaml v1.0.0 // indirect | ||
github.com/go-logr/logr v0.1.0 // indirect | ||
github.com/go-logr/zapr v0.1.0 // indirect | ||
github.com/gogo/protobuf v1.1.1 // indirect | ||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b | ||
github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4 // indirect | ||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect | ||
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect | ||
github.com/google/uuid v1.0.0 // indirect | ||
github.com/googleapis/gnostic v0.2.0 // indirect | ||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect | ||
github.com/hashicorp/golang-lru v0.5.0 // indirect | ||
github.com/imdario/mergo v0.3.6 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.5 // indirect | ||
github.com/kubernetes/kubernetes v1.12.1 | ||
github.com/kubic-project/dex-operator v0.0.0-20181120155903-6899f85378b2 | ||
github.com/kubic-project/kubic-init v0.0.0-20181029092444-8266cfbf30df | ||
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect | ||
github.com/onsi/gomega v1.4.2 | ||
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709 // indirect | ||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect | ||
github.com/pkg/errors v0.8.0 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/renstrom/dedent v1.0.0 | ||
github.com/spf13/cobra v0.0.3 | ||
github.com/spf13/pflag v1.0.3 | ||
github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50 // indirect | ||
github.com/stretchr/testify v1.2.2 // indirect | ||
github.com/ugorji/go v1.1.1 // indirect | ||
github.com/yuroyoro/swalker v0.0.0-20160622113523-0a5950e9162f // indirect | ||
go.uber.org/atomic v1.3.2 // indirect | ||
go.uber.org/multierr v1.1.0 // indirect | ||
go.uber.org/zap v1.9.1 // indirect | ||
golang.org/x/crypto v0.0.0-20180222182404-49796115aa4b // indirect | ||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58 | ||
golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced // indirect | ||
golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e // indirect | ||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect | ||
golang.org/x/tools v0.0.0-20181101071927-45ff765b4815 // indirect | ||
google.golang.org/appengine v1.2.0 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
k8s.io/api v0.0.0-20180712090710-2d6f90ab1293 | ||
k8s.io/apiextensions-apiserver v0.0.0-20180808065829-408db4a50408 // indirect | ||
k8s.io/apimachinery v0.0.0-20180621070125-103fd098999d | ||
k8s.io/apiserver v0.0.0-20180808060109-1844acd6a035 | ||
k8s.io/client-go v0.0.0-20180806134042-1f13a808da65 | ||
k8s.io/code-generator v0.0.0-20181101090831-772c233fdd26 // indirect | ||
k8s.io/gengo v0.0.0-20181019081622-7338e4bfd691 // indirect | ||
k8s.io/klog v0.1.0 | ||
k8s.io/kube-openapi v0.0.0-20180928202339-9dfdf9be683f // indirect | ||
k8s.io/kubernetes v1.11.3 | ||
k8s.io/utils v0.0.0-20180918230422-cd34563cd63c // indirect | ||
sigs.k8s.io/controller-runtime v0.1.4 | ||
sigs.k8s.io/testing_frameworks v0.0.0-20180709092217-5818a3a284a1 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright 2018 SUSE LINUX GmbH, Nuernberg, Germany.. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
package test | ||
|
||
import ( | ||
"flag" | ||
"testing" | ||
) | ||
|
||
// SkipUnlessIntegrationTesting should skip this specific test if we are not running in integration | ||
// testing mode | ||
func SkipUnlessIntegrationTesting(t *testing.T) { | ||
if testing.Short() { | ||
t.SkipNow() | ||
} | ||
} | ||
|
||
// ShouldRunIntegrationSetupAndTeardown should skip this specific test if we are not running in | ||
// integration testing mode | ||
func ShouldRunIntegrationSetupAndTeardown(m *testing.M) bool { | ||
flag.Parse() | ||
return !testing.Short() | ||
} |