Disable health check button if managed

Also, update ui screen tests to expect
injecting "listener_port: null" if
listener_port is empty

Signed-off-by: Seth Foster <fosterbseth@gmail.com>
This commit is contained in:
Seth Foster 2024-01-31 13:59:01 -05:00 committed by Seth Foster
parent a252d0ae33
commit eeae1d59d4
3 changed files with 3 additions and 1 deletions

View File

@ -36,6 +36,7 @@ describe('<InstanceAdd />', () => {
});
});
expect(InstancesAPI.create).toHaveBeenCalledWith({
listener_port: null, // injected if listener_port is not set
node_type: 'hop',
});
expect(history.location.pathname).toBe('/instances/13/details');

View File

@ -369,7 +369,7 @@ function InstanceDetail({ setBreadcrumb, isK8s }) {
isDisabled={
!config?.me?.is_superuser ||
instance.health_check_pending ||
!instance.managed
instance.managed
}
variant="primary"
ouiaId="health-check-button"

View File

@ -48,6 +48,7 @@ describe('<InstanceDetail/>', () => {
cpu_capacity: 32,
mem_capacity: 38,
enabled: true,
managed: false,
managed_by_policy: true,
node_type: 'execution',
node_state: 'ready',