@@ -44,6 +44,14 @@ describe('Given a function to get the default cluster user', () => {
44
44
} )
45
45
} )
46
46
47
+ describe ( 'when the OS is Ubuntu 18.04' , ( ) => {
48
+ const cluster = { config : { Image : { Os : 'ubuntu1804' } } }
49
+ it ( 'should be ubuntu' , ( ) => {
50
+ const result = clusterDefaultUser ( cluster )
51
+ expect ( result ) . toBe ( 'ubuntu' )
52
+ } )
53
+ } )
54
+
47
55
describe ( 'when the OS is Ubuntu 20.04' , ( ) => {
48
56
const cluster = { config : { Image : { Os : 'ubuntu2004' } } }
49
57
it ( 'should be ubuntu' , ( ) => {
@@ -67,4 +75,20 @@ describe('Given a function to get the default cluster user', () => {
67
75
expect ( result ) . toBe ( 'centos' )
68
76
} )
69
77
} )
78
+
79
+ describe ( 'when the OS is Rhel 8' , ( ) => {
80
+ const cluster = { config : { Image : { Os : 'rhel8' } } }
81
+ it ( 'should be ec2-user' , ( ) => {
82
+ const result = clusterDefaultUser ( cluster )
83
+ expect ( result ) . toBe ( 'ec2-user' )
84
+ } )
85
+ } )
86
+
87
+ describe ( 'when the OS is Rhel 9' , ( ) => {
88
+ const cluster = { config : { Image : { Os : 'rhel9' } } }
89
+ it ( 'should be ec2-user' , ( ) => {
90
+ const result = clusterDefaultUser ( cluster )
91
+ expect ( result ) . toBe ( 'ec2-user' )
92
+ } )
93
+ } )
70
94
} )
0 commit comments