Skip to content

Commit 38c10ff

Browse files
committed
test: fix DeploymentServiceTest
1 parent a013fc9 commit 38c10ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/application-server/src/test/java/de/tum/cit/aet/helios/deployment/DeploymentServiceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void testGetLatestDeploymentByEnvironmentId() {
137137
public void testDeployWithInvalidDeployRequest() {
138138
DeployRequest deployRequest = mock(DeployRequest.class);
139139
when(deployRequest.environmentId()).thenReturn(null);
140-
when(deployRequest.branchName()).thenReturn("main");
140+
when(deployRequest.commitSha()).thenReturn("main");
141141

142142
Exception exception =
143143
assertThrows(
@@ -146,10 +146,10 @@ public void testDeployWithInvalidDeployRequest() {
146146
deploymentService.deployToEnvironment(deployRequest);
147147
});
148148

149-
assertTrue(exception.getMessage().contains("Environment ID and branch name must not be null"));
149+
assertTrue(exception.getMessage().contains("Environment ID and commit sha must not be null"));
150150

151151
when(deployRequest.environmentId()).thenReturn(1L);
152-
when(deployRequest.branchName()).thenReturn(null);
152+
when(deployRequest.commitSha()).thenReturn(null);
153153

154154
Exception exception2 =
155155
assertThrows(
@@ -158,7 +158,7 @@ public void testDeployWithInvalidDeployRequest() {
158158
deploymentService.deployToEnvironment(deployRequest);
159159
});
160160

161-
assertTrue(exception2.getMessage().contains("Environment ID and branch name must not be null"));
161+
assertTrue(exception2.getMessage().contains("Environment ID and commit sha must not be null"));
162162
}
163163

164164
@Test

0 commit comments

Comments
 (0)