diff --git a/frontend/src/__tests__/util.test.tsx b/frontend/src/__tests__/util.test.tsx index db583d50..db5530d7 100644 --- a/frontend/src/__tests__/util.test.tsx +++ b/frontend/src/__tests__/util.test.tsx @@ -44,6 +44,14 @@ describe('Given a function to get the default cluster user', () => { }) }) + describe('when the OS is Ubuntu 18.04', () => { + const cluster = {config: {Image: {Os: 'ubuntu1804'}}} + it('should be ubuntu', () => { + const result = clusterDefaultUser(cluster) + expect(result).toBe('ubuntu') + }) + }) + describe('when the OS is Ubuntu 20.04', () => { const cluster = {config: {Image: {Os: 'ubuntu2004'}}} it('should be ubuntu', () => { @@ -67,4 +75,20 @@ describe('Given a function to get the default cluster user', () => { expect(result).toBe('centos') }) }) + + describe('when the OS is Rhel 8', () => { + const cluster = {config: {Image: {Os: 'rhel8'}}} + it('should be ec2-user', () => { + const result = clusterDefaultUser(cluster) + expect(result).toBe('ec2-user') + }) + }) + + describe('when the OS is Rhel 9', () => { + const cluster = {config: {Image: {Os: 'rhel9'}}} + it('should be ec2-user', () => { + const result = clusterDefaultUser(cluster) + expect(result).toBe('ec2-user') + }) + }) })