Rename integration test framework to unit

This commit is contained in:
James Munnelly 2018-03-22 19:18:00 +00:00
parent 0a0747dac7
commit 42c5599305
4 changed files with 10 additions and 10 deletions

View File

@ -9,7 +9,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha1"
"github.com/jetstack/cert-manager/test/integration"
"github.com/jetstack/cert-manager/test/unit"
)
const (
@ -36,7 +36,7 @@ type solverFixture struct {
Namespace string
// f is the integration test fixture being used for this test
f *integration.Fixture
f *unit.Fixture
// createdIngress is used to store a reference to an ingress resource created
// during a tests PreFn. This should probably be removed in order to further
// generalise this test fixture
@ -53,7 +53,7 @@ func (s *solverFixture) Setup(t *testing.T) {
if s.Namespace == "" {
s.Namespace = defaultTestNamespace
}
s.f = &integration.Fixture{
s.f = &unit.Fixture{
T: t,
KubeObjects: s.KubeObjects,
CertManagerObjects: s.CMObjects,
@ -77,7 +77,7 @@ func (s *solverFixture) Finish(t *testing.T) {
}
}
func buildFakeSolver(f *integration.Fixture, issuer v1alpha1.GenericIssuer) *Solver {
func buildFakeSolver(f *unit.Fixture, issuer v1alpha1.GenericIssuer) *Solver {
s := &Solver{
issuer: issuer,
client: f.KubeClient(),

View File

@ -7,7 +7,7 @@ import (
"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha1"
"github.com/jetstack/cert-manager/pkg/issuer/acme/client"
"github.com/jetstack/cert-manager/test/integration"
"github.com/jetstack/cert-manager/test/unit"
)
const (
@ -29,14 +29,14 @@ type acmeFixture struct {
Err bool
// f is the integration test fixture being used for this test
f *integration.Fixture
f *unit.Fixture
}
func (s *acmeFixture) Setup(t *testing.T) {
if s.Client == nil {
s.Client = &client.FakeACME{}
}
s.f = &integration.Fixture{
s.f = &unit.Fixture{
T: t,
KubeObjects: s.KubeObjects,
CertManagerObjects: s.CMObjects,
@ -60,7 +60,7 @@ func (s *acmeFixture) Finish(t *testing.T) {
}
}
func buildFakeAcme(f *integration.Fixture, client *client.FakeACME, issuer v1alpha1.GenericIssuer) *Acme {
func buildFakeAcme(f *unit.Fixture, client *client.FakeACME, issuer v1alpha1.GenericIssuer) *Acme {
a, err := New(issuer,
f.KubeClient(),
f.CertManagerClient(),

View File

@ -1,4 +1,4 @@
package integration
package unit
import (
"flag"

View File

@ -1,4 +1,4 @@
package integration
package unit
import (
"math/rand"