Skip to content

Commit

Permalink
refactor(clouddriver): rename OortService.oort.getTargetServerGroupTy…
Browse files Browse the repository at this point in the history
…ped to getTargetServerGroup

since it's the only version of that method
  • Loading branch information
dbyron-sf committed Sep 14, 2023
1 parent e7e3a12 commit e2a62c4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class TargetServerGroupResolver {
private TargetServerGroup resolveByTarget(TargetServerGroup.Params params, Location location) {
try {
ServerGroup tsg = fetchWithRetries {
oortService.getTargetServerGroupTyped(params.app,
oortService.getTargetServerGroup(params.app,
params.credentials,
params.cluster,
params.cloudProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,14 @@ public Response getServerGroup(String account, String serverGroup, String region
}

@Override
public ServerGroup getTargetServerGroupTyped(
public ServerGroup getTargetServerGroup(
String app,
String account,
String cluster,
String cloudProvider,
String scope,
String target) {
return getService()
.getTargetServerGroupTyped(app, account, cluster, cloudProvider, scope, target);
return getService().getTargetServerGroup(app, account, cluster, cloudProvider, scope, target);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Response getServerGroup(

@GET(
"/applications/{app}/clusters/{account}/{cluster}/{cloudProvider}/{scope}/serverGroups/target/{target}")
ServerGroup getTargetServerGroupTyped(
ServerGroup getTargetServerGroup(
@Path("app") String app,
@Path("account") String account,
@Path("cluster") String cluster,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class TargetServerGroupResolverSpec extends Specification {
))

then:
1 * oort.getTargetServerGroupTyped("test", "testCreds", "test-app", "abc", "north-pole", "current_asg") >>
1 * oort.getTargetServerGroup("test", "testCreds", "test-app", "abc", "north-pole", "current_asg") >>
new ServerGroup([
name : "test-app-v010",
region: "north-pole"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class SourceResolverSpec extends Specification {
def source = resolver.getSource(stage)

then:
1 * oort.getTargetServerGroupTyped(
1 * oort.getTargetServerGroup(
'app',
'test',
'app-test',
Expand Down Expand Up @@ -174,7 +174,7 @@ class SourceResolverSpec extends Specification {
def source = resolver.getSource(stage)

then:
1 * oort.getTargetServerGroupTyped(
1 * oort.getTargetServerGroup(
'app',
'test2',
'app-test',
Expand Down

0 comments on commit e2a62c4

Please sign in to comment.