Add net7 to testing matrix (#1005)

Signed-off-by: halspang <halspang@microsoft.com>

Signed-off-by: halspang <halspang@microsoft.com>
This commit is contained in:
halspang 2023-01-26 11:00:43 -08:00 committed by GitHub
parent 389de69180
commit 76d4b682ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 96 additions and 103 deletions

View File

@ -19,26 +19,26 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
dotnet-version: ['3.1', '5.0', '6.0'] dotnet-version: ['3.1', '6.0', '7.0']
include: include:
- dotnet-version: '3.1' - dotnet-version: '3.1'
install-3: true install-3: true
install-5: false
display-name: '.NET Core 3.1' display-name: '.NET Core 3.1'
framework: 'netcoreapp3.1' framework: 'netcoreapp3.1'
prefix: 'netcoreapp31' prefix: 'netcoreapp31'
- dotnet-version: '5.0' install-version: '3.1.x' # We always need a new .NET
install-3: false
install-5: true
display-name: '.NET 5.0'
framework: 'net5'
prefix: 'net5'
- dotnet-version: '6.0' - dotnet-version: '6.0'
install-3: false install-3: false
install-5: false
display-name: '.NET 6.0' display-name: '.NET 6.0'
framework: 'net6' framework: 'net6'
prefix: 'net6' prefix: 'net6'
install-version: '6.0.x'
- dotnet-version: '7.0'
install-3: false
display-name: '.NET 7.0'
framework: 'net7'
prefix: 'net7'
install-version: '7.0.x'
env: env:
NUPKG_OUTDIR: bin/Release/nugets NUPKG_OUTDIR: bin/Release/nugets
GOVER: 1.17 GOVER: 1.17
@ -110,20 +110,15 @@ jobs:
docker ps docker ps
- name: Setup Vault's test token - name: Setup Vault's test token
run: echo myroot > /tmp/.hashicorp_vault_token run: echo myroot > /tmp/.hashicorp_vault_token
- name: Setup .NET Core 3.1 - name: Setup ${{ matrix.display-name }}
uses: actions/setup-dotnet@v1
if: matrix.install-3
with:
dotnet-version: 3.1.x
- name: Setup .NET 5.0
uses: actions/setup-dotnet@v1
if: matrix.install-5
with:
dotnet-version: 5.0.x
- name: Setup .NET 6.0 # We always need 6.0 to build.
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
dotnet-version: 6.0.x dotnet-version: ${{ matrix.install-version }}
- name: Setup .NET 7.0 # net7 is always required.
uses: actions/setup-dotnet@v1
if: ${{ matrix.install-version != '7.0.x' }}
with:
dotnet-version: 7.0.x
- name: Build - name: Build
# disable deterministic builds, just for test run. Deterministic builds break coverage for some reason # disable deterministic builds, just for test run. Deterministic builds break coverage for some reason
run: dotnet build --configuration release /p:GITHUB_ACTIONS=false run: dotnet build --configuration release /p:GITHUB_ACTIONS=false

View File

@ -26,7 +26,7 @@ jobs:
- name: Setup .NET Core - name: Setup .NET Core
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
dotnet-version: 6.0.x dotnet-version: 7.0.x
- name: Build - name: Build
run: dotnet build --configuration release run: dotnet build --configuration release
- name: Generate Packages - name: Generate Packages
@ -42,44 +42,39 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
dotnet-version: ['3.1', '5.0', '6.0'] dotnet-version: ['3.1', '6.0', '7.0']
include: include:
- dotnet-version: '3.1' - dotnet-version: '3.1'
install-3: true install-3: true
install-5: false
display-name: '.NET Core 3.1' display-name: '.NET Core 3.1'
framework: 'netcoreapp3.1' framework: 'netcoreapp3.1'
prefix: 'netcoreapp31' prefix: 'netcoreapp31'
- dotnet-version: '5.0' install-version: '3.1.x' # We always need a new .NET
install-3: false
install-5: true
display-name: '.NET 5.0'
framework: 'net5'
prefix: 'net5'
- dotnet-version: '6.0' - dotnet-version: '6.0'
install-3: false install-3: false
install-5: false
display-name: '.NET 6.0' display-name: '.NET 6.0'
framework: 'net6' framework: 'net6'
prefix: 'net6' prefix: 'net6'
install-version: '6.0.x'
- dotnet-version: '7.0'
install-3: false
display-name: '.NET 7.0'
framework: 'net7'
prefix: 'net7'
install-version: '7.0.x'
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Parse release version - name: Parse release version
run: python ./.github/scripts/get_release_version.py run: python ./.github/scripts/get_release_version.py
- name: Setup .NET Core 3.1 - name: Setup ${{ matrix.display-name }}
uses: actions/setup-dotnet@v1
if: matrix.install-3
with:
dotnet-version: 3.1.x
- name: Setup .NET 5.0
uses: actions/setup-dotnet@v1
if: matrix.install-5
with:
dotnet-version: 5.0.x
- name: Setup .NET 6.0 # We always need 6.0 to build.
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
dotnet-version: 6.0.x dotnet-version: ${{ matrix.install-version }}
- name: Setup .NET 7.0 # net7 is always required.
uses: actions/setup-dotnet@v1
if: ${{ matrix.install-version != '7.0.x' }}
with:
dotnet-version: 7.0.x
- name: Build - name: Build
# disable deterministic builds, just for test run. Deterministic builds break coverage for some reason # disable deterministic builds, just for test run. Deterministic builds break coverage for some reason
run: dotnet build --configuration release /p:GITHUB_ACTIONS=false run: dotnet build --configuration release /p:GITHUB_ACTIONS=false

View File

@ -1,7 +1,7 @@
{ {
"_comment": "This policy allows the 5.0.100 SDK or patches in that family.", "_comment": "This policy allows the 7.0.101 SDK or patches in that family.",
"sdk": { "sdk": {
"version": "5.0.100", "version": "7.0.101",
"rollForward": "latestMajor" "rollForward": "latestMajor"
} }
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,4 @@
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Copyright 2021 The Dapr Authors // Copyright 2021 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -33,7 +33,7 @@ namespace Dapr.Actors.AspNetCore.IntegrationTest
public async Task CanActivateActorWithDependencyInjection() public async Task CanActivateActorWithDependencyInjection()
{ {
using var factory = new AppWebApplicationFactory(); using var factory = new AppWebApplicationFactory();
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
// Doing this twice verifies that the Actor stays active and retains state using DI. // Doing this twice verifies that the Actor stays active and retains state using DI.
var text = await IncrementCounterAsync(httpClient, "A"); var text = await IncrementCounterAsync(httpClient, "A");

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,4 @@
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Copyright 2021 The Dapr Authors // Copyright 2021 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -14,6 +14,8 @@
using System; using System;
using System.Net.Http; using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
@ -24,8 +26,6 @@ using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Xunit; using Xunit;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Xunit.Sdk; using Xunit.Sdk;
namespace Dapr.Actors.AspNetCore.IntegrationTest namespace Dapr.Actors.AspNetCore.IntegrationTest
@ -56,7 +56,7 @@ namespace Dapr.Actors.AspNetCore.IntegrationTest
{ {
using var factory = new AppWebApplicationFactory(); using var factory = new AppWebApplicationFactory();
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var response = await httpClient.GetAsync("/healthz"); var response = await httpClient.GetAsync("/healthz");
await Assert2XXStatusAsync(response); await Assert2XXStatusAsync(response);
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
<BaseNamespace>Dapr.Actors.AspNetCore</BaseNamespace> <BaseNamespace>Dapr.Actors.AspNetCore</BaseNamespace>
</PropertyGroup> </PropertyGroup>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
<RootNamespace>Dapr.Actors</RootNamespace> <RootNamespace>Dapr.Actors</RootNamespace>
<DefineConstants>$(DefineConstants);ACTORS</DefineConstants> <DefineConstants>$(DefineConstants);ACTORS</DefineConstants>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,4 @@
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Copyright 2021 The Dapr Authors // Copyright 2021 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -11,7 +11,7 @@
// limitations under the License. // limitations under the License.
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -33,7 +33,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
Name = "jimmy" Name = "jimmy"
}; };
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/requires-api-token") var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/requires-api-token")
{ {
Content = new StringContent(JsonConvert.SerializeObject(userInfo), Encoding.UTF8, "application/json") Content = new StringContent(JsonConvert.SerializeObject(userInfo), Encoding.UTF8, "application/json")
@ -56,7 +56,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
Name = "jimmy" Name = "jimmy"
}; };
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/requires-api-token") var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/requires-api-token")
{ {
Content = new StringContent(JsonConvert.SerializeObject(userInfo), Encoding.UTF8, "application/json") Content = new StringContent(JsonConvert.SerializeObject(userInfo), Encoding.UTF8, "application/json")

View File

@ -1,4 +1,4 @@
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Copyright 2021 The Dapr Authors // Copyright 2021 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -35,7 +35,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/B") var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/B")
{ {
@ -53,7 +53,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/register-user") var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/register-user")
{ {
@ -83,7 +83,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/register-user") var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/register-user")
{ {
@ -114,7 +114,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/register-user-plaintext") var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/register-user-plaintext")
{ {
@ -145,7 +145,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/register-user") var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/register-user")
{ {

View File

@ -1,4 +1,4 @@
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Copyright 2021 The Dapr Authors // Copyright 2021 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -13,7 +13,6 @@
namespace Dapr.AspNetCore.IntegrationTest namespace Dapr.AspNetCore.IntegrationTest
{ {
using System;
using System.Net.Http; using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
using Dapr.AspNetCore.IntegrationTest.App; using Dapr.AspNetCore.IntegrationTest.App;
@ -28,7 +27,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
await daprClient.SaveStateAsync("testStore", "test", new Widget() { Size = "small", Count = 17, }); await daprClient.SaveStateAsync("testStore", "test", new Widget() { Size = "small", Count = 17, });
@ -47,7 +46,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
var widget = new Widget() { Size = "small", Count = 17, }; var widget = new Widget() { Size = "small", Count = 17, };
@ -67,7 +66,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/controllerwithoutstateentry/test"); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/controllerwithoutstateentry/test");
@ -84,7 +83,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
await daprClient.SaveStateAsync("testStore", "test", new Widget() { Size = "small", Count = 17, }); await daprClient.SaveStateAsync("testStore", "test", new Widget() { Size = "small", Count = 17, });
@ -103,7 +102,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
await daprClient.SaveStateAsync("testStore", "test", new Widget() { Size = "small", Count = 17, }); await daprClient.SaveStateAsync("testStore", "test", new Widget() { Size = "small", Count = 17, });
@ -122,7 +121,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
var widget = new Widget() { Size = "small", Count = 17, }; var widget = new Widget() { Size = "small", Count = 17, };
@ -142,7 +141,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/controllerwithstateentry/test"); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/controllerwithstateentry/test");
@ -159,7 +158,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/echo-user?name=jimmy"); var request = new HttpRequestMessage(HttpMethod.Post, "http://localhost/echo-user?name=jimmy");

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,4 @@
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Copyright 2021 The Dapr Authors // Copyright 2021 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -26,7 +26,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var daprClient = factory.DaprClient; var daprClient = factory.DaprClient;
await daprClient.SaveStateAsync("testStore", "test", new Widget() { Size = "small", Count = 17, }); await daprClient.SaveStateAsync("testStore", "test", new Widget() { Size = "small", Count = 17, });

View File

@ -28,7 +28,7 @@ namespace Dapr.AspNetCore.IntegrationTest
{ {
using (var factory = new AppWebApplicationFactory()) using (var factory = new AppWebApplicationFactory())
{ {
var httpClient = factory.CreateClient(); var httpClient = factory.CreateClient(new Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryClientOptions { HandleCookies = false });
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/dapr/subscribe"); var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/dapr/subscribe");
var response = await httpClient.SendAsync(request); var response = await httpClient.SendAsync(request);

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Grpc.AspNetCore" Version="2.39.0" /> <PackageReference Include="Grpc.AspNetCore" Version="2.39.0" />

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Dapr.E2E.Test.App.ReentrantActor' " /> <PropertyGroup Condition=" '$(RunConfiguration)' == 'Dapr.E2E.Test.App.ReentrantActor' " />

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.9.0" /> <PackageReference Include="FluentAssertions" Version="5.9.0" />

View File

@ -11,16 +11,16 @@
// limitations under the License. // limitations under the License.
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Reflection; using System.Reflection;
using System.Runtime.Versioning;
using Xunit.Abstractions; using Xunit.Abstractions;
using static System.IO.Path; using static System.IO.Path;
using System.Runtime.Versioning;
using System;
using System.Collections.Generic;
using System.Globalization;
namespace Dapr.E2E.Test namespace Dapr.E2E.Test
{ {
@ -136,10 +136,14 @@ namespace Dapr.E2E.Test
{ {
frameworkMoniker = "net5"; frameworkMoniker = "net5";
} }
else else if (targetFrameworkName == ".NETCoreApp,Version=v6.0")
{ {
frameworkMoniker = "net6"; frameworkMoniker = "net6";
} }
else
{
frameworkMoniker = "net7";
}
return frameworkMoniker; return frameworkMoniker;
} }

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5;net6</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net6;net7</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>