File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
core/src/main/groovy/noe/common/utils Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,10 @@ class Platform {
132132 return (isRHEL() && (osVersion ==~ / .*el8.*/ )) || forceRhel8()
133133 }
134134
135+ boolean isRHEL9 () {
136+ return (isRHEL() && (osVersion ==~ / .*el9.*/ )) || forceRhel9()
137+ }
138+
135139 boolean isSolaris11 () {
136140 return isSolaris() && (osVersion ==~ / 5\. 11/ )
137141 }
@@ -186,4 +190,13 @@ class Platform {
186190 private boolean forceRhel8 () {
187191 return Boolean . parseBoolean(Library . getUniversalProperty(' force.rhel.8' , ' false' ))
188192 }
193+
194+ /**
195+ * As on Docker, the 'os.name' of the system is determined by the host OS and not the container one, to make tests
196+ * work it is necessary to mock that we are, indeed, using RHEL9 machine.
197+ * @return value of the 'force.rhel.9' property
198+ */
199+ private boolean forceRhel9 () {
200+ return Boolean . parseBoolean(Library . getUniversalProperty(' force.rhel.9' , ' false' ))
201+ }
189202}
You can’t perform that action at this time.
0 commit comments