func TestAudit(t *testing.T) {
	tcs := []struct {
		auditLevel            auditinternal.Level
		enableMutatingWebhook bool
	}{
		{
			auditLevel:            auditinternal.LevelRequestResponse,
			enableMutatingWebhook: false,
		},
		{
			auditLevel:            auditinternal.LevelMetadata,
			enableMutatingWebhook: true,
		},
		{
			auditLevel:            auditinternal.LevelRequest,
			enableMutatingWebhook: true,
		},
		{
			auditLevel:            auditinternal.LevelRequestResponse,
			enableMutatingWebhook: true,
		},
	}
	for version := range versions {
		for _, tc := range tcs {
			t.Run(fmt.Sprintf("%s.%s.%t", version, tc.auditLevel, tc.enableMutatingWebhook), func(t *testing.T) {
				testAudit(t, version, tc.auditLevel, tc.enableMutatingWebhook)
			})
		}
	}
}
// TestAudit ensures that both v1beta1 and v1 version audit api could work.
TestAudit ensures that both v1beta1 and v1 version audit api could work.
// TestAudit ensures that both v1beta1 and v1 version audit api could work .
func TestAudit(t *testing.T) {
	tcs := []struct {
		auditLevel            auditinternal.Level
		enableMutatingWebhook bool
	}{
		{
			auditLevel:            auditinternal.LevelRequestResponse,
			enableMutatingWebhook: false,
		},
		{
			auditLevel:            auditinternal.LevelMetadata,
			enableMutatingWebhook: true,
		},
		{
			auditLevel:            auditinternal.LevelRequest,
			enableMutatingWebhook: true,
		},
		{
			auditLevel:            auditinternal.LevelRequestResponse,
			enableMutatingWebhook: true,
		},
	}
	for version := range versions {
		for _, tc := range tcs {
			t.Run(fmt.Sprintf("%s.%s.%t", version, tc.auditLevel, tc.enableMutatingWebhook), func(t *testing.T) {
				testAudit(t, version, tc.auditLevel, tc.enableMutatingWebhook)
			})
		}
	}
}
func TestAudit ( t * testing . T ) { tcs := [ ] struct { auditLevel auditinternal . Level enableMutatingWebhook bool } { { auditLevel : auditinternal . LevelRequestResponse , enableMutatingWebhook : false , } , { auditLevel : auditinternal . LevelMetadata , enableMutatingWebhook : true , } , { auditLevel : auditinternal . LevelRequest , enableMutatingWebhook : true , } , { auditLevel : auditinternal . LevelRequestResponse , enableMutatingWebhook : true , } , } for version := range versions { for _ , tc := range tcs { t . Run ( fmt . Sprintf ( " " , version , tc . auditLevel , tc . enableMutatingWebhook ) , func ( t * testing . T ) { testAudit ( t , version , tc . auditLevel , tc . enableMutatingWebhook ) } ) } } }
TestAudit ensures that both v1beta1 and v1 version audit api could work.
TestAudit ensures that both v1beta1 and v1 version audit api could work .