File tree Expand file tree Collapse file tree 6 files changed +28
-13
lines changed
GreptimeDB.Ingester.IntegrationTests
GreptimeDB.Ingester.Tests Expand file tree Collapse file tree 6 files changed +28
-13
lines changed Original file line number Diff line number Diff line change 3939 6.0.x
4040 7.0.x
4141 8.0.x
42+ 9.0.x
4243
4344 - name : Restore
4445 run : dotnet restore
9192 - name : Setup .NET
9293 uses : actions/setup-dotnet@v5
9394 with :
94- dotnet-version : 8.0.x
95+ dotnet-version : |
96+ 8.0.x
97+ 9.0.x
9598
9699 - name : Restore
97100 run : dotnet restore
Original file line number Diff line number Diff line change 11<Project >
22 <PropertyGroup >
3- <TargetFrameworks >net6.0;net7.0;net8.0</TargetFrameworks >
3+ <TargetFrameworks >net6.0;net7.0;net8.0;net9.0 </TargetFrameworks >
44 <Nullable >enable</Nullable >
55 <ImplicitUsings >enable</ImplicitUsings >
66 <LangVersion >latest</LangVersion >
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ public GreptimeClientTests()
2626 } ;
2727 }
2828
29- public Task InitializeAsync ( )
29+ public ValueTask InitializeAsync ( )
3030 {
3131 _client = new GreptimeClient ( _options ) ;
32- return Task . CompletedTask ;
32+ return ValueTask . CompletedTask ;
3333 }
3434
35- public async Task DisposeAsync ( )
35+ public async ValueTask DisposeAsync ( )
3636 {
3737 if ( _client != null )
3838 {
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >net8.0</ TargetFramework >
4+ <TargetFrameworks >net8.0;net9.0</ TargetFrameworks >
55 <IsPackable >false</IsPackable >
66 <IsTestProject >true</IsTestProject >
7- <!-- Allow underscores in test method names -->
8- <NoWarn >$(NoWarn);CA1707</NoWarn >
7+ <!-- Allow underscores in test method names; xUnit1051: CancellationToken suggestion -->
8+ <NoWarn >$(NoWarn);CA1707;xUnit1051 </NoWarn >
99 </PropertyGroup >
1010
1111 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFramework >net8.0</ TargetFramework >
4+ <TargetFrameworks >net8.0;net9.0</ TargetFrameworks >
55 <IsPackable >false</IsPackable >
66 <IsTestProject >true</IsTestProject >
7- <!-- Allow underscores in test method names -->
8- <NoWarn >$(NoWarn);CA1707</NoWarn >
7+ <!-- Allow underscores in test method names; xUnit1051: CancellationToken suggestion -->
8+ <NoWarn >$(NoWarn);CA1707;xUnit1051 </NoWarn >
99 </PropertyGroup >
1010
1111 <ItemGroup >
Original file line number Diff line number Diff line change @@ -62,13 +62,19 @@ public void Sanitize_EmptyOrNull_ThrowsArgumentException(string? input)
6262 [ Theory ]
6363 [ InlineData ( "table123" , "table123" ) ]
6464 [ InlineData ( "Table123Name" , "table123_name" ) ]
65- [ InlineData ( "123table" , "123table" ) ]
6665 public void Sanitize_WithNumbers_PreservesNumbers ( string input , string expected )
6766 {
6867 var result = NameSanitizer . Sanitize ( input ) ;
6968 result . Should ( ) . Be ( expected ) ;
7069 }
7170
71+ [ Fact ]
72+ public void Sanitize_StartsWithNumber_ThrowsArgumentException ( )
73+ {
74+ var act = ( ) => NameSanitizer . Sanitize ( "123table" ) ;
75+ act . Should ( ) . Throw < ArgumentException > ( ) ;
76+ }
77+
7278 [ Fact ]
7379 public void Sanitize_AlreadySnakeCase_NoChange ( )
7480 {
@@ -79,10 +85,16 @@ public void Sanitize_AlreadySnakeCase_NoChange()
7985 [ Theory ]
8086 [ InlineData ( "a" , "a" ) ]
8187 [ InlineData ( "A" , "a" ) ]
82- [ InlineData ( "_" , "_" ) ]
8388 public void Sanitize_SingleCharacter_Succeeds ( string input , string expected )
8489 {
8590 var result = NameSanitizer . Sanitize ( input ) ;
8691 result . Should ( ) . Be ( expected ) ;
8792 }
93+
94+ [ Fact ]
95+ public void Sanitize_OnlyUnderscore_ThrowsArgumentException ( )
96+ {
97+ var act = ( ) => NameSanitizer . Sanitize ( "_" ) ;
98+ act . Should ( ) . Throw < ArgumentException > ( ) ;
99+ }
88100}
You can’t perform that action at this time.
0 commit comments