use of io.syndesis.qe.account.Account in project syndesis-qe by syndesisio.
the class AMQ method addAccounts.
public void addAccounts() {
// account to use broker-amq instead of syndesis-amq. It is uses in AMQ-TO-REST test
Account amqProdAccount = new Account();
Map<String, String> amqProdAccountParameters = new HashMap<>();
amqProdAccountParameters.put("username", "amq");
amqProdAccountParameters.put("password", "topSecret");
amqProdAccountParameters.put("brokerUrl", "tcp://broker-amq-tcp:61616");
amqProdAccount.setService("amq");
amqProdAccount.setProperties(amqProdAccountParameters);
Account openwireAccount = new Account();
Map<String, String> openwireAccountParameters = new HashMap<>();
openwireAccountParameters.put("username", "amq");
openwireAccountParameters.put("password", "topSecret");
openwireAccountParameters.put("brokerUrl", "tcp://syndesis-amq-tcp:61616");
openwireAccount.setService("amq");
openwireAccount.setProperties(openwireAccountParameters);
Account amqpAccount = new Account();
Map<String, String> amqpAccountParameters = new HashMap<>();
amqpAccountParameters.put("username", "amq");
amqpAccountParameters.put("password", "topSecret");
amqpAccountParameters.put("connectionUri", "amqp://syndesis-amq-tcp:5672");
amqpAccountParameters.put("clientID", UUID.randomUUID().toString());
amqpAccountParameters.put("skipCertificateCheck", "Disable");
amqpAccountParameters.put("brokerCertificate", "");
amqpAccountParameters.put("clientCertificate", "");
amqpAccount.setService("amqp");
amqpAccount.setProperties(amqpAccountParameters);
Account mqttAccount = new Account();
Map<String, String> mqttAccountParameters = new HashMap<>();
mqttAccountParameters.put("userName", "amq");
mqttAccountParameters.put("password", "topSecret");
mqttAccountParameters.put("brokerUrl", "tcp://syndesis-amq-tcp:1883");
mqttAccount.setService("MQTT");
mqttAccount.setProperties(mqttAccountParameters);
AccountsDirectory.getInstance().addAccount("AMQ_PROD", amqProdAccount);
AccountsDirectory.getInstance().addAccount("AMQ", openwireAccount);
AccountsDirectory.getInstance().addAccount("AMQP", amqpAccount);
AccountsDirectory.getInstance().addAccount("QE MQTT", mqttAccount);
}
use of io.syndesis.qe.account.Account in project syndesis-qe by syndesisio.
the class FTP method initProperties.
private void initProperties() {
Account account = AccountsDirectory.getInstance().get(Account.Name.FTP);
Map<String, String> properties = new HashMap<>();
account.getProperties().forEach((key, value) -> properties.put(key.toLowerCase(), value));
appName = properties.get("host");
ftpCommandPort = Integer.parseInt(properties.get("port"));
}
use of io.syndesis.qe.account.Account in project syndesis-qe by syndesisio.
the class MongoDb36 method addAccount.
public void addAccount() {
Account mongodbAccount = new Account();
mongodbAccount.setService("mongodb36");
Map<String, String> accountParameters = new HashMap<>();
accountParameters.put("host", APP_NAME);
accountParameters.put("user", MONGODB_USER);
accountParameters.put("password", MONGODB_PASSWORD);
accountParameters.put("database", MONGODB_DATABASE);
// this does not work for now
// accountParameters.put("admindb", MONGODB_DATABASE);
accountParameters.put("url", MONGDB_URL);
mongodbAccount.setProperties(accountParameters);
AccountsDirectory.getInstance().addAccount(Account.Name.MONGODB36.getId(), mongodbAccount);
}
use of io.syndesis.qe.account.Account in project syndesis-qe by syndesisio.
the class HTTPValidationSteps method sendGetRequestUsingAndPath.
@When("send get request using {string} and {string} path")
public void sendGetRequestUsingAndPath(String account, String path) {
final Account a = AccountsDirectory.getInstance().get(account);
HTTPUtils.doGetRequest(a.getProperty("baseUrl") + path);
}
use of io.syndesis.qe.account.Account in project syndesis-qe by syndesisio.
the class SalesforceAccount method getInstance.
public static ForceApi getInstance() {
if (salesforce == null) {
final Account salesforceAccount = AccountsDirectory.getInstance().get(Account.Name.SALESFORCE);
TestUtils.withRetry(() -> {
try {
salesforce = new ForceApi(new ApiConfig().setClientId(salesforceAccount.getProperty("clientId")).setClientSecret(salesforceAccount.getProperty("clientSecret")).setUsername(salesforceAccount.getProperty("userName")).setPassword(salesforceAccount.getProperty("password")).setForceURL(salesforceAccount.getProperty("loginUrl")));
return true;
} catch (Exception ex) {
log.error("Unable to connect to salesforce, will retry in 5 minutes");
return false;
}
}, 3, 300000L, "Unable to connect to SalesForce");
}
return salesforce;
}
Aggregations