func configMapOperations(t *testing.T, kubeclient kubernetes.Interface) {
	// create, get, watch, update, patch, list and delete configmap.
	configMap := &apiv1.ConfigMap{
		ObjectMeta: metav1.ObjectMeta{
			Name: "audit-configmap",
		},
		Data: map[string]string{
			"map-key": "map-value",
		},
	}

	_, err := kubeclient.CoreV1().ConfigMaps(namespace).Create(context.TODO(), configMap, metav1.CreateOptions{})
	expectNoError(t, err, "failed to create audit-configmap")

	_, err = kubeclient.CoreV1().ConfigMaps(namespace).Get(context.TODO(), configMap.Name, metav1.GetOptions{})
	expectNoError(t, err, "failed to get audit-configmap")

	configMapChan, err := kubeclient.CoreV1().ConfigMaps(namespace).Watch(context.TODO(), watchOptions)
	expectNoError(t, err, "failed to create watch for config maps")
	for range configMapChan.ResultChan() {
		// Block until watchOptions.TimeoutSeconds expires.
		// If the test finishes before watchOptions.TimeoutSeconds expires, the watch audit
		// event at stage ResponseComplete will not be generated.
	}

	_, err = kubeclient.CoreV1().ConfigMaps(namespace).Update(context.TODO(), configMap, metav1.UpdateOptions{})
	expectNoError(t, err, "failed to update audit-configmap")

	_, err = kubeclient.CoreV1().ConfigMaps(namespace).Patch(context.TODO(), configMap.Name, types.JSONPatchType, patch, metav1.PatchOptions{})
	expectNoError(t, err, "failed to patch configmap")

	_, err = kubeclient.CoreV1().ConfigMaps(namespace).List(context.TODO(), metav1.ListOptions{})
	expectNoError(t, err, "failed to list config maps")

	err = kubeclient.CoreV1().ConfigMaps(namespace).Delete(context.TODO(), configMap.Name, metav1.DeleteOptions{})
	expectNoError(t, err, "failed to delete audit-configmap")
}
// configMapOperations is a set of known operations performed on the configmap type
// which correspond to the expected events.
// This is shared by the dynamic test
configMapOperations is a set of known operations performed on the configmap type
which correspond to the expected events.
This is shared by the dynamic test
// configMapOperations is a set of known operations performed on the configmap type // which correspond to the expected events . // This is shared by the dynamic test
func configMapOperations(t *testing.T, kubeclient kubernetes.Interface) {
	configMap := &apiv1.ConfigMap{
		ObjectMeta: metav1.ObjectMeta{
			Name: "audit-configmap",
		},
		Data: map[string]string{
			"map-key": "map-value",
		},
	}
	_, err := kubeclient.CoreV1().ConfigMaps(namespace).Create(context.TODO(), configMap, metav1.CreateOptions{})
	expectNoError(t, err, "failed to create audit-configmap")
	_, err = kubeclient.CoreV1().ConfigMaps(namespace).Get(context.TODO(), configMap.Name, metav1.GetOptions{})
	expectNoError(t, err, "failed to get audit-configmap")
	configMapChan, err := kubeclient.CoreV1().ConfigMaps(namespace).Watch(context.TODO(), watchOptions)
	expectNoError(t, err, "failed to create watch for config maps")
	for range configMapChan.ResultChan() {
	}
	_, err = kubeclient.CoreV1().ConfigMaps(namespace).Update(context.TODO(), configMap, metav1.UpdateOptions{})
	expectNoError(t, err, "failed to update audit-configmap")
	_, err = kubeclient.CoreV1().ConfigMaps(namespace).Patch(context.TODO(), configMap.Name, types.JSONPatchType, patch, metav1.PatchOptions{})
	expectNoError(t, err, "failed to patch configmap")
	_, err = kubeclient.CoreV1().ConfigMaps(namespace).List(context.TODO(), metav1.ListOptions{})
	expectNoError(t, err, "failed to list config maps")
	err = kubeclient.CoreV1().ConfigMaps(namespace).Delete(context.TODO(), configMap.Name, metav1.DeleteOptions{})
	expectNoError(t, err, "failed to delete audit-configmap")
}
func configMapOperations ( t * testing . T , kubeclient kubernetes . Interface ) { configMap := & apiv1 . ConfigMap { ObjectMeta : metav1 . ObjectMeta { Name : " " , } , Data : map [ string ] string { " " : " " , } , } _ , err := kubeclient . CoreV1 ( ) . ConfigMaps ( namespace ) . Create ( context . TODO ( ) , configMap , metav1 . CreateOptions { } ) expectNoError ( t , err , " " ) _ , err = kubeclient . CoreV1 ( ) . ConfigMaps ( namespace ) . Get ( context . TODO ( ) , configMap . Name , metav1 . GetOptions { } ) expectNoError ( t , err , " " ) configMapChan , err := kubeclient . CoreV1 ( ) . ConfigMaps ( namespace ) . Watch ( context . TODO ( ) , watchOptions ) expectNoError ( t , err , " " ) for range configMapChan . ResultChan ( ) { } _ , err = kubeclient . CoreV1 ( ) . ConfigMaps ( namespace ) . Update ( context . TODO ( ) , configMap , metav1 . UpdateOptions { } ) expectNoError ( t , err , " " ) _ , err = kubeclient . CoreV1 ( ) . ConfigMaps ( namespace ) . Patch ( context . TODO ( ) , configMap . Name , types . JSONPatchType , patch , metav1 . PatchOptions { } ) expectNoError ( t , err , " " ) _ , err = kubeclient . CoreV1 ( ) . ConfigMaps ( namespace ) . List ( context . TODO ( ) , metav1 . ListOptions { } ) expectNoError ( t , err , " " ) err = kubeclient . CoreV1 ( ) . ConfigMaps ( namespace ) . Delete ( context . TODO ( ) , configMap . Name , metav1 . DeleteOptions { } ) expectNoError ( t , err , " " ) }
configMapOperations is a set of known operations performed on the configmap type
which correspond to the expected events.
configMapOperations is a set of known operations performed on the configmap type which correspond to the expected events .
// create, get, watch, update, patch, list and delete configmap. // Block until watchOptions.TimeoutSeconds expires. // If the test finishes before watchOptions.TimeoutSeconds expires, the watch audit // event at stage ResponseComplete will not be generated.