const defaultConfigTmplJSON …
const defaultConfigTmplYAML …
func TestNewFromConfig(t *testing.T) { … }
type Service …
func NewTestServer(s Service, cert, key, caCert []byte) (*httptest.Server, error) { … }
type mockService …
func (m *mockService) Review(r *v1alpha1.ImageReview) { … }
func (m *mockService) Allow() { … }
func (m *mockService) Deny() { … }
func (m *mockService) HTTPStatusCode() int { … }
func newImagePolicyWebhook(callbackURL string, clientCert, clientKey, ca []byte, cacheTime time.Duration, defaultAllow bool) (*Plugin, error) { … }
func TestTLSConfig(t *testing.T) { … }
type webhookCacheTestCase …
func testWebhookCacheCases(t *testing.T, serv *mockService, wh *Plugin, attr admission.Attributes, tests []webhookCacheTestCase) { … }
func TestWebhookCache(t *testing.T) { … }
func TestContainerCombinations(t *testing.T) { … }
type fakeAttributes …
func (f fakeAttributes) AddAnnotation(k, v string) error { … }
func TestDefaultAllow(t *testing.T) { … }
type annotationService …
func (a *annotationService) Review(r *v1alpha1.ImageReview) { … }
func (a *annotationService) HTTPStatusCode() int { … }
func (a *annotationService) Annotations() map[string]string { … }
func TestAnnotationFiltering(t *testing.T) { … }
func TestReturnedAnnotationAdd(t *testing.T) { … }
func goodPod(containerID string) *api.Pod { … }