new-integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java
public static void createConfigMapAndVerify(
      String configMapName,
      String domainUid,
      String namespace,
      List<String> modelFiles) {
    LoggingFacade logger = getLogger();
    assertNotNull(configMapName, "ConfigMap name cannot be null");

    Map<String, String> labels = new HashMap<>();
    labels.put("weblogic.domainUid", domainUid);

    assertNotNull(configMapName, "ConfigMap name cannot be null");

    logger.info("Create ConfigMap {0} that contains model files {1}",
        configMapName, modelFiles);

    Map<String, String> data = new HashMap<>();

    for (String modelFile : modelFiles) {
      addModelFile(data, modelFile);
    }

    V1ObjectMeta meta = new V1ObjectMeta()
        .labels(labels)
        .name(configMapName)
        .namespace(namespace);
    V1ConfigMap configMap = new V1ConfigMap()
        .data(data)
        .metadata(meta);

    assertTrue(assertDoesNotThrow(() -> createConfigMap(configMap),
        String.format("Create ConfigMap %s failed due to Kubernetes client  ApiException", configMapName)),
        String.format("Failed to create ConfigMap %s", configMapName));
  }
/**
   * Create a Kubernetes ConfigMap with the given parameters and verify that the operation succeeds.
   *
   * @param configMapName the name of the Kubernetes ConfigMap to be created
   * @param domainUid the domain to which the cluster belongs
   * @param namespace Kubernetes namespace that the domain is hosted
   * @param modelFiles list of the names of the WDT mode files in the ConfigMap
   */
Create a Kubernetes ConfigMap with the given parameters and verify that the operation succeeds.
@param configMapName the name of the Kubernetes ConfigMap to be created
@param domainUid the domain to which the cluster belongs
@param namespace Kubernetes namespace that the domain is hosted
@param modelFiles list of the names of the WDT mode files in the ConfigMap
Create a Kubernetes ConfigMap with the given parameters and verify that the operation succeeds . @param configMapName the name of the Kubernetes ConfigMap to be created @param domainUid the domain to which the cluster belongs @param namespace Kubernetes namespace that the domain is hosted @param modelFiles list of the names of the WDT mode files in the ConfigMap
public static void createConfigMapAndVerify(
      String configMapName,
      String domainUid,
      String namespace,
      List<String> modelFiles) {
    LoggingFacade logger = getLogger();
    assertNotNull(configMapName, "ConfigMap name cannot be null");
    Map<String, String> labels = new HashMap<>();
    labels.put("weblogic.domainUid", domainUid);
    assertNotNull(configMapName, "ConfigMap name cannot be null");
    logger.info("Create ConfigMap {0} that contains model files {1}",
        configMapName, modelFiles);
    Map<String, String> data = new HashMap<>();
    for (String modelFile : modelFiles) {
      addModelFile(data, modelFile);
    }
    V1ObjectMeta meta = new V1ObjectMeta()
        .labels(labels)
        .name(configMapName)
        .namespace(namespace);
    V1ConfigMap configMap = new V1ConfigMap()
        .data(data)
        .metadata(meta);
    assertTrue(assertDoesNotThrow(() -> createConfigMap(configMap),
        String.format("Create ConfigMap %s failed due to Kubernetes client  ApiException", configMapName)),
        String.format("Failed to create ConfigMap %s", configMapName));
  }
public static void createConfigMapAndVerify ( String configMapName , String domainUid , String namespace , List < String > modelFiles ) { LoggingFacade logger = getLogger ( ) ; assertNotNull ( configMapName , "ConfigMap name cannot be null" ) ; Map < String , String > labels = new HashMap < > ( ) ; labels . put ( "weblogic.domainUid" , domainUid ) ; assertNotNull ( configMapName , "ConfigMap name cannot be null" ) ; logger . info ( "Create ConfigMap {0} that contains model files {1}" , configMapName , modelFiles ) ; Map < String , String > data = new HashMap < > ( ) ; for ( String modelFile : modelFiles ) { addModelFile ( data , modelFile ) ; } V1ObjectMeta meta = new V1ObjectMeta ( ) . labels ( labels ) . name ( configMapName ) . namespace ( namespace ) ; V1ConfigMap configMap = new V1ConfigMap ( ) . data ( data ) . metadata ( meta ) ; assertTrue ( assertDoesNotThrow ( ( ) -> createConfigMap ( configMap ) , String . format ( "Create ConfigMap %s failed due to Kubernetes client  ApiException" , configMapName ) ) , String . format ( "Failed to create ConfigMap %s" , configMapName ) ) ; }
Create a Kubernetes ConfigMap with the given parameters and verify that the operation succeeds.
Create a Kubernetes ConfigMap with the given parameters and verify that the operation succeeds .