@Test @DisplayName("test if NO CCM parameters are passed the user data does not contain them") public void testBuildUserDataWithoutCCMParams() throws IOException { PlatformParameters platformParameters = mock(PlatformParameters.class); ScriptParams scriptParams = mock(ScriptParams.class); when(scriptParams.getDiskPrefix()).thenReturn("sd"); when(scriptParams.getStartLabel()).thenReturn(98); when(platformParameters.scriptParams()).thenReturn(scriptParams); String userData = underTest.buildUserData(Platform.platform("AZURE"), "priv-key".getBytes(), "cloudbreak", platformParameters, "pass", "cert", null, null); String expectedUserData = FileReaderUtils.readFileFromClasspath("azure-init.sh"); Assert.assertEquals(expectedUserData, userData); }
public String buildUserData(Platform cloudPlatform, byte[] cbSshKeyDer, String sshUser, PlatformParameters parameters, String saltBootPassword, String cbCert, CcmParameters ccmParameters, ProxyConfig proxyConfig) { String userData = build(cloudPlatform, cbSshKeyDer, sshUser, parameters, saltBootPassword, cbCert, ccmParameters, proxyConfig); LOGGER.debug("User data content; {}", userData); return userData; }
UserDataBuilder { public String buildUserData(Platform cloudPlatform, byte[] cbSshKeyDer, String sshUser, PlatformParameters parameters, String saltBootPassword, String cbCert, CcmParameters ccmParameters, ProxyConfig proxyConfig) { String userData = build(cloudPlatform, cbSshKeyDer, sshUser, parameters, saltBootPassword, cbCert, ccmParameters, proxyConfig); LOGGER.debug("User data content; {}", userData); return userData; } }
UserDataBuilder { public String buildUserData(Platform cloudPlatform, byte[] cbSshKeyDer, String sshUser, PlatformParameters parameters, String saltBootPassword, String cbCert, CcmParameters ccmParameters, ProxyConfig proxyConfig) { String userData = build(cloudPlatform, cbSshKeyDer, sshUser, parameters, saltBootPassword, cbCert, ccmParameters, proxyConfig); LOGGER.debug("User data content; {}", userData); return userData; }  }
UserDataBuilder { public String buildUserData(Platform cloudPlatform, byte[] cbSshKeyDer, String sshUser, PlatformParameters parameters, String saltBootPassword, String cbCert, CcmParameters ccmParameters, ProxyConfig proxyConfig) { String userData = build(cloudPlatform, cbSshKeyDer, sshUser, parameters, saltBootPassword, cbCert, ccmParameters, proxyConfig); LOGGER.debug("User data content; {}", userData); return userData; }  String buildUserData(Platform cloudPlatform, byte[] cbSshKeyDer, String sshUser,
            PlatformParameters parameters, String saltBootPassword, String cbCert, CcmParameters ccmParameters, ProxyConfig proxyConfig); }
UserDataBuilder { public String buildUserData(Platform cloudPlatform, byte[] cbSshKeyDer, String sshUser, PlatformParameters parameters, String saltBootPassword, String cbCert, CcmParameters ccmParameters, ProxyConfig proxyConfig) { String userData = build(cloudPlatform, cbSshKeyDer, sshUser, parameters, saltBootPassword, cbCert, ccmParameters, proxyConfig); LOGGER.debug("User data content; {}", userData); return userData; }  String buildUserData(Platform cloudPlatform, byte[] cbSshKeyDer, String sshUser,
            PlatformParameters parameters, String saltBootPassword, String cbCert, CcmParameters ccmParameters, ProxyConfig proxyConfig);  }