Skip to content

Commit c6ed78a

Browse files
ForestEckhardtForest Eckhardt
authored andcommitted
Updates tests to add .NET 9 and to use .NET 8 as default
1 parent 24e30ec commit c6ed78a

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

integration/buildpack_yml_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func testBuildpackYML(t *testing.T, context spec.G, it spec.S) {
5757

5858
err = os.WriteFile(filepath.Join(source, "buildpack.yml"), []byte(`---
5959
dotnet-framework:
60-
version: 6.0.0
60+
version: 8.0.0
6161
`), 0666)
6262
Expect(err).NotTo(HaveOccurred())
6363

integration/default_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ func testDefault(t *testing.T, context spec.G, it spec.S) {
7777
MatchRegexp(fmt.Sprintf(`%s \d+\.\d+\.\d+`, buildpackInfo.Buildpack.Name)),
7878
" Resolving ASP.NET Core Runtime version",
7979
" Candidate version sources (in priority order):",
80-
` runtimeconfig.json -> "6.0.0"`,
80+
MatchRegexp(` runtimeconfig.json -> "\d+\.\d+\.\d+"`),
8181
` <unknown> -> ""`,
8282
"",
8383
" No exact version match found; attempting version roll-forward",
8484
"",
85-
MatchRegexp(` Selected ASP.NET Core Runtime version \(using runtimeconfig.json\): 6\.0\.\d+`),
85+
MatchRegexp(` Selected ASP.NET Core Runtime version \(using runtimeconfig.json\): \d+\.\d+\.\d+`),
8686
))
8787
Expect(logs).To(ContainLines(
8888
" Executing build process",
89-
MatchRegexp(` Installing ASP.NET Core Runtime 6\.0\.\d+`),
89+
MatchRegexp(` Installing ASP.NET Core Runtime \d+\.\d+\.\d+`),
9090
MatchRegexp(` Completed in ([0-9]*(\.[0-9]*)?[a-z]+)+`),
9191
"",
9292
" Configuring launch environment",

integration/layer_reuse_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {
102102
Expect(logs).To(ContainLines(
103103
" Resolving ASP.NET Core Runtime version",
104104
" Candidate version sources (in priority order):",
105-
` runtimeconfig.json -> "6.0.0"`,
105+
MatchRegexp(` runtimeconfig.json -> "\d+\.\d+\.\d+"`),
106106
` <unknown> -> ""`,
107107
"",
108108
" No exact version match found; attempting version roll-forward",
109109
"",
110-
MatchRegexp(` Selected ASP.NET Core Runtime version \(using runtimeconfig.json\): 6\.0\.\d+`),
110+
MatchRegexp(` Selected ASP.NET Core Runtime version \(using runtimeconfig.json\): \d+\.\d+\.\d+`),
111111
))
112112
Expect(logs).To(ContainLines(
113113
MatchRegexp(fmt.Sprintf(" Reusing cached layer /layers/%s/dotnet-core-aspnet-runtime", strings.ReplaceAll(buildpackInfo.Buildpack.ID, "/", "_"))),
@@ -193,7 +193,7 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {
193193
settings.Buildpacks.BuildPlan.Online,
194194
).
195195
WithEnv(map[string]string{
196-
"BP_DOTNET_FRAMEWORK_VERSION": "6.*",
196+
"BP_DOTNET_FRAMEWORK_VERSION": "9.*",
197197
}).
198198
Execute(name, source)
199199
Expect(err).NotTo(HaveOccurred(), logs.String())
@@ -208,8 +208,8 @@ func testLayerReuse(t *testing.T, context spec.G, it spec.S) {
208208
Expect(logs).To(ContainLines(
209209
" Resolving ASP.NET Core Runtime version",
210210
" Candidate version sources (in priority order):",
211-
` BP_DOTNET_FRAMEWORK_VERSION -> "6.*"`,
212-
` runtimeconfig.json -> "6.0.0"`,
211+
` BP_DOTNET_FRAMEWORK_VERSION -> "9.*"`,
212+
MatchRegexp(` runtimeconfig.json -> "\d+\.\d+\.\d+"`),
213213
` <unknown> -> ""`,
214214
"",
215215
MatchRegexp(` Selected ASP.NET Core Runtime version \(using BP_DOTNET_FRAMEWORK_VERSION\): \d+\.\d+\.\d+`),

integration/runtimeconfig_noop_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func testRuntimeconfigNoop(t *testing.T, context spec.G, it spec.S) {
4343
source, err = occam.Source(filepath.Join("testdata", "default"))
4444
Expect(err).NotTo(HaveOccurred())
4545

46-
Expect(os.WriteFile(filepath.Join(source, "fde_dotnet_6.runtimeconfig.json"), []byte(`{
46+
Expect(os.WriteFile(filepath.Join(source, "default.runtimeconfig.json"), []byte(`{
4747
"runtimeOptions": {
4848
"configProperties": {
4949
"System.GC.Server": true,
@@ -97,7 +97,7 @@ func testRuntimeconfigNoop(t *testing.T, context spec.G, it spec.S) {
9797
source, err = occam.Source(filepath.Join("testdata", "default"))
9898
Expect(err).NotTo(HaveOccurred())
9999

100-
Expect(os.Remove(filepath.Join(source, "fde_dotnet_6.runtimeconfig.json"))).To(Succeed())
100+
Expect(os.Remove(filepath.Join(source, "default.runtimeconfig.json"))).To(Succeed())
101101
})
102102

103103
it.After(func() {

integration/testdata/backwards_compatible/fde_dotnet_6.runtimeconfig.json renamed to integration/testdata/backwards_compatible/backwards_compatible.runtimeconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"runtimeOptions": {
3-
"tfm": "net6.0",
3+
"tfm": "net8.0",
44
"frameworks": [
55
{
66
"name": "Microsoft.NETCore.App",
7-
"version": "6.0.0"
7+
"version": "8.0.0"
88
},
99
{
1010
"name": "Microsoft.AspNetCore.App",
11-
"version": "6.0.0"
11+
"version": "8.0.0"
1212
}
1313
],
1414
"configProperties": {
@@ -17,4 +17,4 @@
1717
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
1818
}
1919
}
20-
}
20+
}

integration/testdata/default/fde_dotnet_6.runtimeconfig.json renamed to integration/testdata/default/default.runtimeconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"runtimeOptions": {
3-
"tfm": "net6.0",
3+
"tfm": "net8.0",
44
"frameworks": [
55
{
66
"name": "Microsoft.NETCore.App",
7-
"version": "6.0.0"
7+
"version": "8.0.0"
88
},
99
{
1010
"name": "Microsoft.AspNetCore.App",
11-
"version": "6.0.0"
11+
"version": "8.0.0"
1212
}
1313
],
1414
"configProperties": {
@@ -17,4 +17,4 @@
1717
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
1818
}
1919
}
20-
}
20+
}

0 commit comments

Comments
 (0)