Skip to content
Snippets Groups Projects
Commit 63d810e1 authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Updated labels

parent cf93c8b9
No related branches found
No related tags found
2 merge requests!273Release 1.8.0 update,!244"Move application availability checks from Janitor to Platform"
...@@ -74,18 +74,16 @@ public class AppDeploymentStateChangeManagerTest { ...@@ -74,18 +74,16 @@ public class AppDeploymentStateChangeManagerTest {
private final DefaultAppDeploymentRepositoryManager deployments = mock(DefaultAppDeploymentRepositoryManager.class); private final DefaultAppDeploymentRepositoryManager deployments = mock(DefaultAppDeploymentRepositoryManager.class);
private final AppDeploymentMonitor monitor = mock(AppDeploymentMonitor.class); private final AppDeploymentMonitor monitor = mock(AppDeploymentMonitor.class);
private final ApplicationEventPublisher publisher = mock(ApplicationEventPublisher.class); private final ApplicationEventPublisher publisher = mock(ApplicationEventPublisher.class);
private final WebhookEventRepository webhookEventRepository = mock(WebhookEventRepository.class); private final WebhookEventRepository webhookEventRepository = mock(WebhookEventRepository.class);
private final Scheduler scheduler = mock(Scheduler.class); private final Scheduler scheduler = mock(Scheduler.class);
private final ListenerManager listenerManager = mock(ListenerManager.class); private final ListenerManager listenerManager = mock(ListenerManager.class);
private ScheduleManager scheduleManager;
private AppDeploymentStateChangeManager manager; private AppDeploymentStateChangeManager manager;
@BeforeEach @BeforeEach
void setup() { void setup() {
when(event.getDeploymentId()).thenReturn(deploymentId); when(event.getDeploymentId()).thenReturn(deploymentId);
scheduleManager = new ScheduleManager( scheduler); manager = new AppDeploymentStateChangeManager(deployments, monitor, publisher, webhookEventRepository, new ScheduleManager(scheduler));
manager = new AppDeploymentStateChangeManager(deployments, monitor, publisher, webhookEventRepository, scheduleManager);
} }
@Test @Test
...@@ -160,7 +158,9 @@ public class AppDeploymentStateChangeManagerTest { ...@@ -160,7 +158,9 @@ public class AppDeploymentStateChangeManagerTest {
when(deployments.load(deploymentId)).thenReturn(stubAppDeployment()); when(deployments.load(deploymentId)).thenReturn(stubAppDeployment());
when(monitor.userAccessDetails(deploymentId)).thenReturn( when(monitor.userAccessDetails(deploymentId)).thenReturn(
new AppUiAccessDetails( new AppUiAccessDetails(
new HashSet<ServiceAccessMethodView>() {{ add(new ServiceAccessMethodView(ServiceAccessMethodType.DEFAULT, "Default", "Web", "url")); }} new HashSet<ServiceAccessMethodView>() {{
add(new ServiceAccessMethodView(ServiceAccessMethodType.DEFAULT, "Default", "Web", "url"));
}}
) )
); );
when(deployments.loadDomainName(deploymentId)).thenReturn("domainName"); when(deployments.loadDomainName(deploymentId)).thenReturn("domainName");
...@@ -262,11 +262,12 @@ public class AppDeploymentStateChangeManagerTest { ...@@ -262,11 +262,12 @@ public class AppDeploymentStateChangeManagerTest {
when(deployments.loadDomainName(deploymentId)).thenReturn("domainName"); when(deployments.loadDomainName(deploymentId)).thenReturn("domainName");
when(deployments.load(deploymentId)).thenReturn(stubAppDeployment()); when(deployments.load(deploymentId)).thenReturn(stubAppDeployment());
when(monitor.userAccessDetails(deploymentId)).thenReturn(new AppUiAccessDetails(new HashSet<ServiceAccessMethodView>() {{ when(monitor.userAccessDetails(deploymentId)).thenReturn(new AppUiAccessDetails(new HashSet<ServiceAccessMethodView>() {{
add(new ServiceAccessMethodView(ServiceAccessMethodType.DEFAULT, "Default", "Web", "url"));}})); add(new ServiceAccessMethodView(ServiceAccessMethodType.DEFAULT, "Default", "Web", "url"));
AppDeploymentHistory history = new AppDeploymentHistory(1L, stubAppDeployment(), new Date(), APPLICATION_DEPLOYED,APPLICATION_DEPLOYMENT_VERIFICATION_IN_PROGRESS); }}));
AppDeploymentHistory history2 = new AppDeploymentHistory(2L, stubAppDeployment(), new Date(), APPLICATION_DEPLOYMENT_VERIFICATION_IN_PROGRESS,APPLICATION_DEPLOYMENT_VERIFIED); AppDeploymentHistory history = new AppDeploymentHistory(1L, stubAppDeployment(), new Date(), APPLICATION_DEPLOYED, APPLICATION_DEPLOYMENT_VERIFICATION_IN_PROGRESS);
AppDeploymentHistory history2 = new AppDeploymentHistory(2L, stubAppDeployment(), new Date(), APPLICATION_DEPLOYMENT_VERIFICATION_IN_PROGRESS, APPLICATION_DEPLOYMENT_VERIFIED);
// added second time as "current" re-deployment, because current state is not added by `update state` function // added second time as "current" re-deployment, because current state is not added by `update state` function
AppDeploymentHistory history3 = new AppDeploymentHistory(3L, stubAppDeployment(), new Date(), APPLICATION_DEPLOYMENT_VERIFICATION_IN_PROGRESS,APPLICATION_DEPLOYMENT_VERIFIED); AppDeploymentHistory history3 = new AppDeploymentHistory(3L, stubAppDeployment(), new Date(), APPLICATION_DEPLOYMENT_VERIFICATION_IN_PROGRESS, APPLICATION_DEPLOYMENT_VERIFIED);
when(deployments.loadStateHistory(deploymentId)).thenReturn(java.util.List.of(history, history2, history3)); when(deployments.loadStateHistory(deploymentId)).thenReturn(java.util.List.of(history, history2, history3));
when(event.getDetail(EventDetailType.NEW_APPLICATION_ID)).thenReturn("10"); when(event.getDetail(EventDetailType.NEW_APPLICATION_ID)).thenReturn("10");
...@@ -275,5 +276,4 @@ public class AppDeploymentStateChangeManagerTest { ...@@ -275,5 +276,4 @@ public class AppDeploymentStateChangeManagerTest {
verify(publisher, never()).publishEvent(any(NotificationEvent.class)); verify(publisher, never()).publishEvent(any(NotificationEvent.class));
} }
}
} \ No newline at end of file
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
"DOWN" : "Down", "DOWN" : "Down",
"UNKNOWN" : "Unknown", "UNKNOWN" : "Unknown",
"DETAILS" : "Details", "DETAILS" : "Details",
"STATE_SINCE" : "State last change", "STATE_SINCE" : "Last state change",
"CONTACT_MAIL" : "Contact mail", "CONTACT_MAIL" : "Contact mail",
"REMOVE" : "Remove cluster", "REMOVE" : "Remove cluster",
"FILE": "Kubernetes config", "FILE": "Kubernetes config",
...@@ -200,10 +200,10 @@ ...@@ -200,10 +200,10 @@
"ADD" : "Adding new remote cluster", "ADD" : "Adding new remote cluster",
"STEP_1" : "General information", "STEP_1" : "General information",
"STEP_2" : "Basic cluster settings", "STEP_2" : "Basic cluster settings",
"STEP_3" : "Advance cluster settings", "STEP_3" : "Advanced cluster settings",
"STEP_1_INFO" : "Kubernetes config file is required to proceed. Please fill text area with content of config.", "STEP_1_INFO" : "Kubernetes configuration is required to proceed. Please paste the content of the .kuberconfig file in the text area.",
"STEP_2_INFO" : "Provide basic information about the cluster. You can also assign cluster to the domain.", "STEP_2_INFO" : "Provide basic information about the new cluster and assign it to one of Your domains.",
"STEP_3_INFO" : "Cluster Ingress and Storage were populated by basic configuration. Edit it to fit more your remote cluster." "STEP_3_INFO" : "Cluster Ingress and Storage properties were populated with default values. Update it according to your remote cluster configuration."
} }
}, },
"GITLAB": { "GITLAB": {
......
...@@ -194,17 +194,17 @@ ...@@ -194,17 +194,17 @@
"UNKNOWN" : "Unknown", "UNKNOWN" : "Unknown",
"CONTACT_MAIL" : "Contact mail", "CONTACT_MAIL" : "Contact mail",
"DETAILS" : "Details", "DETAILS" : "Details",
"STATE_SINCE" : "State last change", "STATE_SINCE" : "Last state change",
"REMOVE" : "Remove cluster", "REMOVE" : "Remove cluster",
"FILE": "Kubernetes config", "FILE": "Kubernetes config",
"WIZARD" : { "WIZARD" : {
"ADD" : "Adding new remote cluster", "ADD" : "Adding new remote cluster",
"STEP_1" : "General information", "STEP_1" : "General information",
"STEP_2" : "Basic cluster settings", "STEP_2" : "Basic cluster settings",
"STEP_3" : "Advance cluster settings", "STEP_3" : "Advanced cluster settings",
"STEP_1_INFO" : "Kubernetes config file is required to proceed. Please fill text area with content of config.", "STEP_1_INFO" : "Kubernetes configuration is required to proceed. Please paste the content of the .kuberconfig file in the text area.",
"STEP_2_INFO" : "Provide basic information about the cluster. You can also assign cluster to the domain.", "STEP_2_INFO" : "Provide basic information about the new cluster and assign it to one of Your domains.",
"STEP_3_INFO" : "Cluster Ingress and Storage were populated by basic configuration. Edit it to fit more your remote cluster." "STEP_3_INFO" : "Cluster Ingress and Storage properties were populated with default values. Update it according to your remote cluster configuration."
} }
}, },
"GITLAB": { "GITLAB": {
......
...@@ -195,17 +195,17 @@ ...@@ -195,17 +195,17 @@
"UNKNOWN" : "Unknown", "UNKNOWN" : "Unknown",
"CONTACT_MAIL" : "Contact mail", "CONTACT_MAIL" : "Contact mail",
"DETAILS" : "Details", "DETAILS" : "Details",
"STATE_SINCE" : "State last change", "STATE_SINCE" : "Last state change",
"REMOVE" : "Remove cluster", "REMOVE" : "Remove cluster",
"FILE": "Kubernetes config", "FILE": "Kubernetes config",
"WIZARD" : { "WIZARD" : {
"ADD" : "Adding new remote cluster", "ADD" : "Adding new remote cluster",
"STEP_1" : "General information", "STEP_1" : "General information",
"STEP_2" : "Basic cluster settings", "STEP_2" : "Basic cluster settings",
"STEP_3" : "Advance cluster settings", "STEP_3" : "Advanced cluster settings",
"STEP_1_INFO" : "Kubernetes config file is required to proceed. Please fill text area with content of config.", "STEP_1_INFO" : "Kubernetes configuration is required to proceed. Please paste the content of the .kuberconfig file in the text area.",
"STEP_2_INFO" : "Provide basic information about the cluster. You can also assign cluster to the domain.", "STEP_2_INFO" : "Provide basic information about the new cluster and assign it to one of Your domains.",
"STEP_3_INFO" : "Cluster Ingress and Storage were populated by basic configuration. Edit it to fit more your remote cluster." "STEP_3_INFO" : "Cluster Ingress and Storage properties were populated with default values. Update it according to your remote cluster configuration."
} }
}, },
"GITLAB": { "GITLAB": {
......
...@@ -201,10 +201,10 @@ ...@@ -201,10 +201,10 @@
"ADD" : "Adding new remote cluster", "ADD" : "Adding new remote cluster",
"STEP_1" : "General information", "STEP_1" : "General information",
"STEP_2" : "Basic cluster settings", "STEP_2" : "Basic cluster settings",
"STEP_3" : "Advance cluster settings", "STEP_3" : "Advanced cluster settings",
"STEP_1_INFO" : "Kubernetes config file is required to proceed. Please fill text area with content of config.", "STEP_1_INFO" : "Kubernetes configuration is required to proceed. Please paste the content of the .kuberconfig file in the text area.",
"STEP_2_INFO" : "Provide basic information about the cluster. You can also assign cluster to the domain.", "STEP_2_INFO" : "Provide basic information about the new cluster and assign it to one of Your domains.",
"STEP_3_INFO" : "Cluster Ingress and Storage were populated by basic configuration. Edit it to fit more your remote cluster." "STEP_3_INFO" : "Cluster Ingress and Storage properties were populated with default values. Update it according to your remote cluster configuration."
} }
}, },
"GITLAB": { "GITLAB": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment