Skip to content

Commit bcc7738

Browse files
committed
Move Deployer, Describer, Lister and Remover int tests to correct package
1 parent f5f049c commit bcc7738

File tree

5 files changed

+34
-33
lines changed

5 files changed

+34
-33
lines changed
Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"k8s.io/apimachinery/pkg/util/rand"
1919

2020
eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1"
21+
knativedeployer "knative.dev/func/pkg/deployer/knative"
2122
fn "knative.dev/func/pkg/functions"
2223
"knative.dev/func/pkg/k8s"
2324
"knative.dev/func/pkg/knative"
@@ -41,9 +42,9 @@ func TestInt_Deploy(t *testing.T) {
4142
client := fn.New(
4243
fn.WithBuilder(oci.NewBuilder("", false)),
4344
fn.WithPusher(oci.NewPusher(true, true, true)),
44-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
45-
fn.WithDescriber(knative.NewDescriber(false)),
46-
fn.WithRemover(knative.NewRemover(false)),
45+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
46+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
47+
fn.WithRemover(knativedeployer.NewRemover(false)),
4748
)
4849

4950
f, err := client.Init(fn.Function{
@@ -113,9 +114,9 @@ func TestInt_Metadata(t *testing.T) {
113114
client := fn.New(
114115
fn.WithBuilder(oci.NewBuilder("", false)),
115116
fn.WithPusher(oci.NewPusher(true, true, true)),
116-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
117-
fn.WithDescriber(knative.NewDescriber(false)),
118-
fn.WithRemover(knative.NewRemover(false)),
117+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
118+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
119+
fn.WithRemover(knativedeployer.NewRemover(false)),
119120
)
120121

121122
// Cluster Resources
@@ -279,9 +280,9 @@ func TestInt_Events(t *testing.T) {
279280
client := fn.New(
280281
fn.WithBuilder(oci.NewBuilder("", false)),
281282
fn.WithPusher(oci.NewPusher(true, true, true)),
282-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
283-
fn.WithDescriber(knative.NewDescriber(false)),
284-
fn.WithRemover(knative.NewRemover(false)),
283+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
284+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
285+
fn.WithRemover(knativedeployer.NewRemover(false)),
285286
)
286287

287288
// Trigger
@@ -355,9 +356,9 @@ func TestInt_Scale(t *testing.T) {
355356
client := fn.New(
356357
fn.WithBuilder(oci.NewBuilder("", false)),
357358
fn.WithPusher(oci.NewPusher(true, true, true)),
358-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
359-
fn.WithDescriber(knative.NewDescriber(false)),
360-
fn.WithRemover(knative.NewRemover(false)),
359+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
360+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
361+
fn.WithRemover(knativedeployer.NewRemover(false)),
361362
)
362363

363364
f, err := client.Init(fn.Function{
@@ -468,9 +469,9 @@ func TestInt_EnvsUpdate(t *testing.T) {
468469
client := fn.New(
469470
fn.WithBuilder(oci.NewBuilder("", false)),
470471
fn.WithPusher(oci.NewPusher(true, true, true)),
471-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
472-
fn.WithDescriber(knative.NewDescriber(false)),
473-
fn.WithRemover(knative.NewRemover(false)),
472+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
473+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
474+
fn.WithRemover(knativedeployer.NewRemover(false)),
474475
)
475476

476477
// Function

pkg/knative/describer_int_test.go renamed to pkg/deployer/knative/describer_int_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
"k8s.io/apimachinery/pkg/util/rand"
1111

12+
knativedeployer "knative.dev/func/pkg/deployer/knative"
1213
fn "knative.dev/func/pkg/functions"
13-
"knative.dev/func/pkg/knative"
1414
"knative.dev/func/pkg/oci"
1515
)
1616

@@ -25,9 +25,9 @@ func TestInt_Describe(t *testing.T) {
2525
client := fn.New(
2626
fn.WithBuilder(oci.NewBuilder("", false)),
2727
fn.WithPusher(oci.NewPusher(true, true, true)),
28-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
29-
fn.WithDescriber(knative.NewDescriber(false)),
30-
fn.WithRemover(knative.NewRemover(false)),
28+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
29+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
30+
fn.WithRemover(knativedeployer.NewRemover(false)),
3131
)
3232

3333
f, err := client.Init(fn.Function{
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
"k8s.io/apimachinery/pkg/util/rand"
1111

12+
knativedeployer "knative.dev/func/pkg/deployer/knative"
1213
fn "knative.dev/func/pkg/functions"
13-
"knative.dev/func/pkg/knative"
1414
"knative.dev/func/pkg/oci"
1515
)
1616

@@ -25,9 +25,9 @@ func TestInt_Labels(t *testing.T) {
2525
client := fn.New(
2626
fn.WithBuilder(oci.NewBuilder("", false)),
2727
fn.WithPusher(oci.NewPusher(true, true, true)),
28-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
29-
fn.WithDescriber(knative.NewDescriber(false)),
30-
fn.WithRemover(knative.NewRemover(false)),
28+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
29+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
30+
fn.WithRemover(knativedeployer.NewRemover(false)),
3131
)
3232

3333
f, err := client.Init(fn.Function{
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
"k8s.io/apimachinery/pkg/util/rand"
1111

12+
knativedeployer "knative.dev/func/pkg/deployer/knative"
1213
fn "knative.dev/func/pkg/functions"
13-
"knative.dev/func/pkg/knative"
1414
"knative.dev/func/pkg/oci"
1515
)
1616

@@ -25,10 +25,10 @@ func TestInt_List(t *testing.T) {
2525
client := fn.New(
2626
fn.WithBuilder(oci.NewBuilder("", false)),
2727
fn.WithPusher(oci.NewPusher(true, true, true)),
28-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
29-
fn.WithDescriber(knative.NewDescriber(false)),
30-
fn.WithLister(knative.NewLister(false)),
31-
fn.WithRemover(knative.NewRemover(false)),
28+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
29+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
30+
fn.WithLister(knativedeployer.NewLister(false)),
31+
fn.WithRemover(knativedeployer.NewRemover(false)),
3232
)
3333

3434
f, err := client.Init(fn.Function{
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99

1010
"k8s.io/apimachinery/pkg/util/rand"
1111

12+
knativedeployer "knative.dev/func/pkg/deployer/knative"
1213
fn "knative.dev/func/pkg/functions"
13-
"knative.dev/func/pkg/knative"
1414
"knative.dev/func/pkg/oci"
1515
)
1616

@@ -25,10 +25,10 @@ func TestInt_Remove(t *testing.T) {
2525
client := fn.New(
2626
fn.WithBuilder(oci.NewBuilder("", false)),
2727
fn.WithPusher(oci.NewPusher(true, true, true)),
28-
fn.WithDeployer(knative.NewDeployer(knative.WithDeployerVerbose(true))),
29-
fn.WithDescriber(knative.NewDescriber(false)),
30-
fn.WithLister(knative.NewLister(false)),
31-
fn.WithRemover(knative.NewRemover(false)),
28+
fn.WithDeployer(knativedeployer.NewDeployer(knativedeployer.WithDeployerVerbose(true))),
29+
fn.WithDescriber(knativedeployer.NewDescriber(false)),
30+
fn.WithLister(knativedeployer.NewLister(false)),
31+
fn.WithRemover(knativedeployer.NewRemover(false)),
3232
)
3333

3434
f, err := client.Init(fn.Function{

0 commit comments

Comments
 (0)