This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-22133-bak in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit 1bd79a9a1428ac2c5bfa90c2f7569597e32b430a Author: Pavel Tupitsyn <[email protected]> AuthorDate: Fri Jul 11 15:48:41 2025 +0300 wip SeedingIgniteTest --- .../SeedingIgniteTest.cs | 41 ++++++++++++++++++++++ .../TestUtilities/IgniteTestStore.cs | 4 +-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/SeedingIgniteTest.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/SeedingIgniteTest.cs new file mode 100644 index 00000000000..bf5e4bdc3d7 --- /dev/null +++ b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/SeedingIgniteTest.cs @@ -0,0 +1,41 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +namespace Apache.Ignite.EntityFrameworkCore.FunctionalTests; + +using Extensions; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.TestUtilities; +using TestUtilities; + +public class SeedingIgniteTest : SeedingTestBase +{ + protected override TestStore TestStore + => IgniteTestStoreFactory.Instance.Create("SeedingTest"); + + protected override SeedingContext CreateContextWithEmptyDatabase(string testId) => + new SeedingIgniteContext(testId); + + protected class SeedingIgniteContext : SeedingContext + { + public SeedingIgniteContext(string testId) + : base(testId) + { + } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + => optionsBuilder.UseIgnite(IgniteTestStore.GetIgniteEndpoint()); + } +} diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestUtilities/IgniteTestStore.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestUtilities/IgniteTestStore.cs index 59c6ec8130a..89444b8f3c0 100644 --- a/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestUtilities/IgniteTestStore.cs +++ b/modules/platforms/dotnet/Apache.Ignite.EntityFrameworkCore.FunctionalTests/TestUtilities/IgniteTestStore.cs @@ -31,6 +31,8 @@ public class IgniteTestStore : RelationalTestStore Connection = new IgniteConnection(ConnectionString); } + public static string GetIgniteEndpoint() => "localhost:10942"; + public override DbContextOptionsBuilder AddProviderOptions(DbContextOptionsBuilder builder) => builder.UseIgnite(GetIgniteEndpoint()); @@ -64,6 +66,4 @@ public class IgniteTestStore : RelationalTestStore await client.Sql.ExecuteScriptAsync(script); } } - - private static string GetIgniteEndpoint() => "localhost:10942"; }
