Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Fixes for integration test(s) of IoTHubManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
sushilraje authored Feb 7, 2019
1 parent 7ed0fa0 commit fa08e19
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions device-simulation/scripts/docker/run
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ run_container() {

echo "Starting Device Simulation ..."

docker run -it -p 9003:9003 \
docker run -detach -p 9003:9003 \
-e PCS_IOTHUB_CONNSTRING \
-e PCS_STORAGEADAPTER_WEBSERVICE_URL="http://host.docker.internal:9022/v1" \
-e PCS_SUBSCRIPTION_ID \
"$DOCKER_IMAGE:testing"
"$DOCKER_IMAGE:DS-1.0.3"
}

run_container
run_container
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ public static Configuration toHubConfiguration(final DeploymentServiceModel mode

// Required labels
labels.put(PACKAGE_TYPE_LABEL, model.getPackageType().toString());
labels.put(CONFIG_TYPE_LABEL, model.getConfigType().toString());
labels.put(DEPLOYMENT_NAME_LABEL, model.getName());
labels.put(DEPLOYMENT_GROUP_ID_LABEL, deploymentGroup.getId());
labels.put(RM_CREATED_LABEL, Boolean.TRUE.toString());
if (!StringUtils.isBlank(model.getConfigType().toString())){
labels.put(CONFIG_TYPE_LABEL, model.getConfigType().toString());
}

// Add optional labels
if (deploymentGroup.getName() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ public DeploymentServiceModel(Configuration deployment) throws
this.packageType = PackageType.deviceConfiguration;
}

this.configType = deployment.getLabels().get(ConfigurationsHelper.CONFIG_TYPE_LABEL.toString());
if (deployment.getLabels().containsKey(ConfigurationsHelper.CONFIG_TYPE_LABEL.toString())) {
this.configType = deployment.getLabels().get(ConfigurationsHelper.CONFIG_TYPE_LABEL.toString());
} else {
this.configType = StringUtils.EMPTY;
}


this.deploymentMetrics = new DeploymentMetrics(deployment.getSystemMetrics(), deployment.getMetrics());
}

Expand Down

0 comments on commit fa08e19

Please sign in to comment.