Skip to content

Commit

Permalink
removed ginkgo from the project and ran update-codegen and mod tidy (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gabo1208 authored Nov 8, 2021
1 parent 4cc5ecf commit ee96d0b
Show file tree
Hide file tree
Showing 124 changed files with 13 additions and 12,117 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ require (
github.com/hashicorp/go-retryablehttp v0.6.7
github.com/kelseyhightower/envconfig v1.4.0
github.com/mitchellh/go-homedir v1.1.0
github.com/onsi/ginkgo v1.16.5
github.com/openzipkin/zipkin-go v0.3.0
github.com/pelletier/go-toml/v2 v2.0.0-beta.2
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
Expand Down
6 changes: 3 additions & 3 deletions test/lib/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ package lib
import (
"context"
"fmt"
"testing"

"github.com/onsi/ginkgo"
"knative.dev/pkg/logging"
"knative.dev/pkg/system"

Expand Down Expand Up @@ -52,7 +52,7 @@ type Client struct {
EventListener *EventListener

Namespace string
T ginkgo.GinkgoTInterface
T *testing.T
Tracker *Tracker

podsCreated []string
Expand All @@ -65,7 +65,7 @@ type Client struct {

// NewClient instantiates and returns several clientsets required for making request to the
// cluster specified by the combination of clusterName and configPath.
func NewClient(configPath string, clusterName string, namespace string, t ginkgo.GinkgoTInterface) (*Client, error) {
func NewClient(configPath string, clusterName string, namespace string, t *testing.T) (*Client, error) {
var err error

client := &Client{}
Expand Down
4 changes: 2 additions & 2 deletions test/lib/recordevents/event_info_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"strconv"
"strings"
"sync"
"testing"
"time"

"github.com/onsi/ginkgo"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/wait"
Expand Down Expand Up @@ -55,7 +55,7 @@ func StartEventRecordOrFail(ctx context.Context, client *testlib.Client, podName
// This pulls events from the pod during any Find or Wait call, storing them
// locally and trimming them from the remote pod store.
type EventInfoStore struct {
tb ginkgo.GinkgoTInterface
tb *testing.T

podName string
podNamespace string
Expand Down
11 changes: 5 additions & 6 deletions test/lib/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"testing"
"time"

"github.com/onsi/ginkgo"
corev1 "k8s.io/api/core/v1"
apierrs "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -157,7 +156,7 @@ var SetupClientOptionNoop SetupClientOption = func(*Client) {
// GSetup creates
// - the client objects needed in the e2e tests,
// - the namespace hosting all objects needed by the test
func GSetup(t ginkgo.GinkgoTInterface, options ...SetupClientOption) *Client {
func GSetup(t *testing.T, options ...SetupClientOption) *Client {
client, err := CreateNamespacedClient(t)
if err != nil {
t.Fatal("Couldn't initialize clients:", err)
Expand All @@ -182,7 +181,7 @@ func GSetup(t ginkgo.GinkgoTInterface, options ...SetupClientOption) *Client {
// Setup creates
// - the client objects needed in the e2e tests,
// - the namespace hosting all objects needed by the test
func Setup(t ginkgo.GinkgoTInterface, runInParallel bool, options ...SetupClientOption) *Client {
func Setup(t *testing.T, runInParallel bool, options ...SetupClientOption) *Client {
client := GSetup(t, options...)

// Run the test case in parallel if needed.
Expand All @@ -193,7 +192,7 @@ func Setup(t ginkgo.GinkgoTInterface, runInParallel bool, options ...SetupClient
return client
}

func CreateNamespacedClient(t ginkgo.GinkgoTInterface) (*Client, error) {
func CreateNamespacedClient(t *testing.T) (*Client, error) {
ns := ""
// Try next MaxNamespaceSkip namespaces before giving up. This should address the issue with
// development cycles when namespaces from previous runs were not cleaned properly.
Expand Down Expand Up @@ -336,7 +335,7 @@ func formatEvent(e *corev1.Event) string {
}

// SetupServiceAccount creates a new namespace if it does not exist.
func SetupServiceAccount(t ginkgo.GinkgoTInterface, client *Client) {
func SetupServiceAccount(t *testing.T, client *Client) {
// https://github.com/kubernetes/kubernetes/issues/66689
// We can only start creating pods after the default ServiceAccount is created by the kube-controller-manager.
err := waitForServiceAccountExists(client, "default", client.Namespace)
Expand All @@ -346,7 +345,7 @@ func SetupServiceAccount(t ginkgo.GinkgoTInterface, client *Client) {
}

// SetupPullSecret sets up kn-eventing-test-pull-secret on the client namespace.
func SetupPullSecret(t ginkgo.GinkgoTInterface, client *Client) {
func SetupPullSecret(t *testing.T, client *Client) {
// If the "default" Namespace has a secret called
// "kn-eventing-test-pull-secret" then use that as the ImagePullSecret
// on the "default" ServiceAccount in this new Namespace.
Expand Down
6 changes: 3 additions & 3 deletions test/lib/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"context"
"encoding/json"
"fmt"
"testing"

"github.com/onsi/ginkgo"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -44,7 +44,7 @@ import (
type Tracker struct {
resourcesToCheckStatus []resources.MetaResource
resourcesToClean []ResourceDeleter
tc ginkgo.GinkgoTInterface
tc *testing.T
dynamicClient dynamic.Interface
}

Expand All @@ -56,7 +56,7 @@ type ResourceDeleter struct {
}

// NewTracker creates a new Tracker
func NewTracker(t ginkgo.GinkgoTInterface, client dynamic.Interface) *Tracker {
func NewTracker(t *testing.T, client dynamic.Interface) *Tracker {
tracker := &Tracker{
resourcesToCheckStatus: make([]resources.MetaResource, 0),
resourcesToClean: make([]ResourceDeleter, 0),
Expand Down
28 changes: 0 additions & 28 deletions third_party/VENDOR-LICENSE/github.com/fsnotify/fsnotify/LICENSE

This file was deleted.

21 changes: 0 additions & 21 deletions third_party/VENDOR-LICENSE/github.com/nxadm/tail/LICENSE

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions third_party/VENDOR-LICENSE/github.com/onsi/ginkgo/LICENSE

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions third_party/VENDOR-LICENSE/gopkg.in/tomb.v1/LICENSE

This file was deleted.

12 changes: 0 additions & 12 deletions vendor/github.com/fsnotify/fsnotify/.editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/fsnotify/fsnotify/.gitattributes

This file was deleted.

6 changes: 0 additions & 6 deletions vendor/github.com/fsnotify/fsnotify/.gitignore

This file was deleted.

36 changes: 0 additions & 36 deletions vendor/github.com/fsnotify/fsnotify/.travis.yml

This file was deleted.

52 changes: 0 additions & 52 deletions vendor/github.com/fsnotify/fsnotify/AUTHORS

This file was deleted.

Loading

0 comments on commit ee96d0b

Please sign in to comment.