Add integration and more unit tests

- Add integration test for serving cert auto-generation and rotation
- Add unit test for `WithInitialEvent` of the cert manager controller
- Move UpdateAPIService() into the `apicerts` package, since that is
  the only user of the function.
This commit is contained in:
Ryan Richard
2020-08-11 10:14:57 -07:00
parent 8034ef24ff
commit fadd718d08
12 changed files with 304 additions and 16 deletions

View File

@@ -13,6 +13,7 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
aggregatorclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset"
placeholdernameclientset "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned"
)
@@ -63,3 +64,9 @@ func NewPlaceholderNameClientset(t *testing.T) placeholdernameclientset.Interfac
return placeholdernameclientset.NewForConfigOrDie(NewClientConfig(t))
}
func NewAggregatedClientset(t *testing.T) aggregatorclient.Interface {
t.Helper()
return aggregatorclient.NewForConfigOrDie(NewClientConfig(t))
}