File tree Expand file tree Collapse file tree 8 files changed +56
-5
lines changed
VirtualClient.Contracts.UnitTests
VirtualClient.Contracts/Parser Expand file tree Collapse file tree 8 files changed +56
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ resources:
16
16
options : --entrypoint=""
17
17
18
18
variables :
19
- VcVersion : 1.14.13
19
+ VcVersion : 1.14.14
20
20
ROOT : $(Build.SourcesDirectory)
21
21
CDP_DEFINITION_BUILD_COUNT : $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
22
22
ENABLE_PRS_DELAYSIGN : 1
@@ -654,4 +654,4 @@ stages:
654
654
msal_client_ID : ' f407a268-1184-4845-92b1-eebfbe0749c0'
655
655
package_path : ' $(Agent.BuildDirectory)/drop/packages'
656
656
repository : ' microsoft-ubuntu-zesty-prod-apt'
657
- release : ' zesty'
657
+ release : ' zesty'
Original file line number Diff line number Diff line change 18
18
vmImage : windows-latest
19
19
20
20
variables :
21
- VcVersion : 1.14.13
21
+ VcVersion : 1.14.14
22
22
ROOT : $(Build.SourcesDirectory)
23
23
CDP_DEFINITION_BUILD_COUNT : $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
24
24
ENABLE_PRS_DELAYSIGN : 1
Original file line number Diff line number Diff line change
1
+ Static hostname: linux-vm-5
2
+ Icon name: computer-vm
3
+ Chassis: vm 🖴
4
+ Machine ID: 86687b25d03f4b0ba54e801b9da2e1b6
5
+ Boot ID: 70a5733f02cd42098b9b09dbb9145ad4
6
+ Virtualization: microsoft
7
+ Operating System: Red Hat Enterprise Linux 9.3 (Plow)
8
+ CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos
9
+ Kernel: Linux 5.14.0-362.8.1.el9_3.x86_64
10
+ Architecture: x86-64
11
+ Hardware Vendor: Microsoft Corporation
12
+ Hardware Model: Virtual Machine
13
+ Firmware Version: Hyper-V UEFI Release v4.1
Original file line number Diff line number Diff line change
1
+ NAME="Red Hat Enterprise Linux"
2
+ VERSION="9.3 (Plow)"
3
+ ID="rhel"
4
+ ID_LIKE="fedora"
5
+ VERSION_ID="9.3"
6
+ PLATFORM_ID="platform:el9"
7
+ PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)"
8
+ ANSI_COLOR="0;31"
9
+ LOGO="fedora-logo-icon"
10
+ CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
11
+ HOME_URL="https://www.redhat.com/"
12
+ DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
13
+ BUG_REPORT_URL="https://bugzilla.redhat.com/"
14
+
15
+ REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
16
+ REDHAT_BUGZILLA_PRODUCT_VERSION=9.3
17
+ REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
18
+ REDHAT_SUPPORT_PRODUCT_VERSION="9.3"
Original file line number Diff line number Diff line change @@ -114,5 +114,15 @@ public void HostnamectlParserRecognizeSUSE()
114
114
Assert . AreEqual ( LinuxDistribution . SUSE , this . testParser . Parse ( ) . LinuxDistribution ) ;
115
115
Assert . AreEqual ( "SUSE Linux Enterprise Server 15 SP3" , this . testParser . Parse ( ) . OperationSystemFullName ) ;
116
116
}
117
+
118
+ [ Test ]
119
+ public void HostnamectlParserRecognizeRedhat93 ( )
120
+ {
121
+ string outputPath = Path . Combine ( this . ExamplePath , "RHEL9Example.txt" ) ;
122
+ this . rawText = File . ReadAllText ( outputPath ) ;
123
+ this . testParser = new HostnamectlParser ( this . rawText ) ;
124
+ Assert . AreEqual ( LinuxDistribution . RHEL8 , this . testParser . Parse ( ) . LinuxDistribution ) ;
125
+ Assert . AreEqual ( "Red Hat Enterprise Linux 9.3 (Plow)" , this . testParser . Parse ( ) . OperationSystemFullName ) ;
126
+ }
117
127
}
118
128
}
Original file line number Diff line number Diff line change @@ -55,5 +55,15 @@ public void OsReleaseFileParserrRecognizeDebian11()
55
55
Assert . AreEqual ( LinuxDistribution . Debian , this . testParser . Parse ( ) . LinuxDistribution ) ;
56
56
Assert . AreEqual ( "Debian GNU/Linux 11 (bullseye)" , this . testParser . Parse ( ) . OperationSystemFullName ) ;
57
57
}
58
+
59
+ [ Test ]
60
+ public void OsReleaseFileParserrRecognizeRHEL93 ( )
61
+ {
62
+ string outputPath = Path . Combine ( this . ExamplePath , "RHEL93Example.txt" ) ;
63
+ this . rawText = File . ReadAllText ( outputPath ) ;
64
+ this . testParser = new OsReleaseFileParser ( this . rawText ) ;
65
+ Assert . AreEqual ( LinuxDistribution . RHEL8 , this . testParser . Parse ( ) . LinuxDistribution ) ;
66
+ Assert . AreEqual ( "Red Hat Enterprise Linux 9.3 (Plow)" , this . testParser . Parse ( ) . OperationSystemFullName ) ;
67
+ }
58
68
}
59
69
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public override LinuxDistributionInfo Parse()
30
30
Regex ubuntuRegex = new Regex ( "Operating System: Ubuntu" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
31
31
Regex debianRegex = new Regex ( "Operating System: Debian" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
32
32
Regex rhel7Regex = new Regex ( @"Operating System: Red Hat Enterprise Linux 7" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
33
- Regex rhel8Regex = new Regex ( @"Operating System: Red Hat Enterprise Linux 8 ." , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
33
+ Regex rhel8Regex = new Regex ( @"Operating System: Red Hat Enterprise Linux (8|9) ." , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
34
34
Regex flatcarRegex = new Regex ( "Operating System: Flatcar" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
35
35
Regex centos7Regex = new Regex ( "Operating System: CentOS Linux 7" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
36
36
Regex centos8Regex = new Regex ( "Operating System: CentOS Linux 8" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public override LinuxDistributionInfo Parse()
31
31
Regex ubuntuRegex = new Regex ( "Name=(\" )?Ubuntu" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
32
32
Regex debianRegex = new Regex ( "Name=(\" )?Debian" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
33
33
Regex rhel7Regex = new Regex ( "PRETTY_NAME=(\" )?Red Hat Enterprise Linux 7." , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
34
- Regex rhel8Regex = new Regex ( "PRETTY_NAME=(\" )?Red Hat Enterprise Linux 8 ." , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
34
+ Regex rhel8Regex = new Regex ( "PRETTY_NAME=(\" )?Red Hat Enterprise Linux (8|9) ." , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
35
35
Regex flatcarRegex = new Regex ( "Name=(\" )?Flatcar" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
36
36
Regex centos7Regex = new Regex ( "Name=(\" )?CentOS Linux 7" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
37
37
Regex centos8Regex = new Regex ( "Name=(\" )?CentOS Linux 8" , RegexOptions . Multiline | RegexOptions . IgnoreCase ) ;
You can’t perform that action at this time.
0 commit comments