new-integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java
public static void createConfigMapFromFiles(String configMapName,
                                              List<Path> files,
                                              String namespace) {

    // create a ConfigMap of the domain
    Map<String, String> data = new HashMap<>();
    for (Path file : files) {
      data.put(file.getFileName().toString(),
          assertDoesNotThrow(() -> readString(file), "readString failed with IOException"));
    }

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

    assertTrue(assertDoesNotThrow(() -> createConfigMap(configMap),
        String.format("createConfigMap failed with ApiException for ConfigMap %s with files %s in namespace %s",
            configMapName, files, namespace)),
        String.format("createConfigMap failed while creating ConfigMap %s in namespace %s", configMapName, namespace));
  }
/**
   * Create ConfigMap from the specified files.
   * @param configMapName name of the ConfigMap to create
   * @param files files to be added in ConfigMap
   * @param namespace the namespace in which the ConfigMap to be created
   */
Create ConfigMap from the specified files.
@param configMapName name of the ConfigMap to create
@param files files to be added in ConfigMap
@param namespace the namespace in which the ConfigMap to be created
Create ConfigMap from the specified files . @param configMapName name of the ConfigMap to create @param files files to be added in ConfigMap @param namespace the namespace in which the ConfigMap to be created
public static void createConfigMapFromFiles(String configMapName,
                                              List<Path> files,
                                              String namespace) {
    Map<String, String> data = new HashMap<>();
    for (Path file : files) {
      data.put(file.getFileName().toString(),
          assertDoesNotThrow(() -> readString(file), "readString failed with IOException"));
    }
    V1ConfigMap configMap = new V1ConfigMap()
        .data(data)
        .metadata(new V1ObjectMeta()
            .name(configMapName)
            .namespace(namespace));
    assertTrue(assertDoesNotThrow(() -> createConfigMap(configMap),
        String.format("createConfigMap failed with ApiException for ConfigMap %s with files %s in namespace %s",
            configMapName, files, namespace)),
        String.format("createConfigMap failed while creating ConfigMap %s in namespace %s", configMapName, namespace));
  }
public static void createConfigMapFromFiles ( String configMapName , List < Path > files , String namespace ) { Map < String , String > data = new HashMap < > ( ) ; for ( Path file : files ) { data . put ( file . getFileName ( ) . toString ( ) , assertDoesNotThrow ( ( ) -> readString ( file ) , "readString failed with IOException" ) ) ; } V1ConfigMap configMap = new V1ConfigMap ( ) . data ( data ) . metadata ( new V1ObjectMeta ( ) . name ( configMapName ) . namespace ( namespace ) ) ; assertTrue ( assertDoesNotThrow ( ( ) -> createConfigMap ( configMap ) , String . format ( "createConfigMap failed with ApiException for ConfigMap %s with files %s in namespace %s" , configMapName , files , namespace ) ) , String . format ( "createConfigMap failed while creating ConfigMap %s in namespace %s" , configMapName , namespace ) ) ; }
Create ConfigMap from the specified files.
Create ConfigMap from the specified files .
// create a ConfigMap of the domain