Skip to content

Commit

Permalink
refactor(provider/kubernetes): use deployed names in result
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Wander committed Oct 12, 2017
1 parent a080f85 commit 78a66ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public DeploymentResult deployAugmentedManifest(KubernetesV2Credentials credenti
deploy(credentials, resource);

DeploymentResult result = new DeploymentResult();
result.setServerGroupNames(new ArrayList<>(Collections.singleton(manifest.getNamespace() + ":" + manifest.getFullResourceName())));
result.setServerGroupNameByRegion(new HashMap<>(Collections.singletonMap(manifest.getNamespace(), manifest.getFullResourceName())));
result.setDeployedNames(new ArrayList<>(Collections.singleton(manifest.getNamespace() + ":" + manifest.getFullResourceName())));
result.setDeployedNamesByLocation(new HashMap<>(Collections.singletonMap(manifest.getNamespace(), Collections.singletonList(manifest.getFullResourceName()))));

return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ metadata:

then:
1 * credentialsMock.createReplicaSet(_) >> null
result.serverGroupNames.size == 1
result.serverGroupNames[0] == "$NAMESPACE:$API_VERSION|$KIND|$NAME-$VERSION"
result.deployedNames.size == 1
result.deployedNames[0] == "$NAMESPACE:$API_VERSION|$KIND|$NAME-$VERSION"
}

void "replica set deployer uses backup namespace"() {
Expand All @@ -135,7 +135,7 @@ metadata:

then:
1 * credentialsMock.createReplicaSet(_) >> null
result.serverGroupNames.size == 1
result.serverGroupNames[0] == "$BACKUP_NAMESPACE:$API_VERSION|$KIND|$NAME-$VERSION"
result.deployedNames.size == 1
result.deployedNames[0] == "$BACKUP_NAMESPACE:$API_VERSION|$KIND|$NAME-$VERSION"
}
}

0 comments on commit 78a66ee

Please sign in to comment.