use of org.eclipse.che.api.workspace.server.spi.environment.MachineConfigsValidator in project devspaces-images by redhat-developer.
the class DockerimageComponentToWorkspaceApplierTest method testGeneratesValidMachineNameFromImageName.
@Test(dataProvider = "imageNames")
public void testGeneratesValidMachineNameFromImageName(String imageName) throws ValidationException, DevfileException {
// given
String machineName = DockerimageComponentToWorkspaceApplier.toMachineName(imageName);
MachineConfigsValidator validator = new MachineConfigsValidator();
Map<String, InternalMachineConfig> configs = new HashMap<>();
configs.put(machineName, new InternalMachineConfig());
// when
validator.validate(configs);
// then no exception is thrown
}
use of org.eclipse.che.api.workspace.server.spi.environment.MachineConfigsValidator in project che-server by eclipse-che.
the class DockerimageComponentToWorkspaceApplierTest method testGeneratesValidMachineNameFromImageName.
@Test(dataProvider = "imageNames")
public void testGeneratesValidMachineNameFromImageName(String imageName) throws ValidationException, DevfileException {
// given
String machineName = DockerimageComponentToWorkspaceApplier.toMachineName(imageName);
MachineConfigsValidator validator = new MachineConfigsValidator();
Map<String, InternalMachineConfig> configs = new HashMap<>();
configs.put(machineName, new InternalMachineConfig());
// when
validator.validate(configs);
// then no exception is thrown
}
Aggregations