Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates test to add .NET 9 and use .NET 8 as default #763

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion integration.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"builders": ["paketobuildpacks/builder:buildpackless-base", "paketobuildpacks/builder-jammy-buildpackless-base"],
"builders": [ "paketobuildpacks/builder-jammy-buildpackless-base"],
"dotnet-core-aspnet": "github.com/paketo-buildpacks/dotnet-core-aspnet",
"dotnet-core-runtime": "github.com/paketo-buildpacks/dotnet-core-runtime",
"dotnet-core-aspnet-runtime": "github.com/paketo-buildpacks/dotnet-core-aspnet-runtime",
Expand Down
4 changes: 2 additions & 2 deletions integration/framework_dependent_deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func testFrameworkDependentDeployment(t *testing.T, context spec.G, it spec.S) {
docker = occam.NewDocker()
})

context("when building a default .NET 6 FDD app", func() {
context("when building a default .NET 8 FDD app", func() {
var (
image occam.Image
container occam.Container
Expand All @@ -51,7 +51,7 @@ func testFrameworkDependentDeployment(t *testing.T, context spec.G, it spec.S) {

it("builds and runs successfully", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "fdd_6"))
source, err = occam.Source(filepath.Join("testdata", "framework_dependent_deployment_8"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand Down
16 changes: 8 additions & 8 deletions integration/framework_dependent_executable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ func testFrameworkDependentExecutable(t *testing.T, context spec.G, it spec.S) {
Expect(os.RemoveAll(source)).To(Succeed())
})

context("when the app is a .NET 6 framework dependent executable", func() {
context("when the app is a .NET 8 framework dependent executable", func() {
it("builds and runs successfully", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "fde_6"))
source, err = occam.Source(filepath.Join("testdata", "framework_dependent_executable_8"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand All @@ -73,14 +73,14 @@ func testFrameworkDependentExecutable(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("fde_dotnet_6")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("Welcome")).OnPort(8080))
})
})

context("when the app is a .NET 8 framework dependent executable", func() {
context("when the app is a .NET 9 framework dependent executable", func() {
it("builds and runs successfully", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "fde_dotnet_8"))
source, err = occam.Source(filepath.Join("testdata", "framework_dependent_executable_9"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand All @@ -101,7 +101,7 @@ func testFrameworkDependentExecutable(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("fde_dotnet_8")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("Welcome")).OnPort(8080))
})
})

Expand All @@ -114,7 +114,7 @@ func testFrameworkDependentExecutable(t *testing.T, context spec.G, it spec.S) {

it("adds a default start process with watchexec and names the normal start process no-reload", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "fde_6"))
source, err = occam.Source(filepath.Join("testdata", "framework_dependent_executable_8"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand All @@ -138,7 +138,7 @@ func testFrameworkDependentExecutable(t *testing.T, context spec.G, it spec.S) {
return logs.String()
}).Should(ContainSubstring(`Now listening on: http://0.0.0.0:8080`))

noReloadContainer, err = docker.Container.Run.WithEntrypoint("fde_dotnet_6").Execute(image.ID)
noReloadContainer, err = docker.Container.Run.WithEntrypoint("framework_dependent_8").Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(func() string {
Expand Down
4 changes: 2 additions & 2 deletions integration/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {

it("presents the expected log output", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "self_contained_executable_6"))
source, err = occam.Source(filepath.Join("testdata", "self_contained_8"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand Down Expand Up @@ -80,7 +80,7 @@ func testLogging(t *testing.T, context spec.G, it spec.S) {
" application/vnd.syft+json",
"",
" Assigning launch processes:",
` source_6_selfcontained (default): /workspace/source_6_selfcontained`,
` webapp_8 (default): /workspace/webapp_8`,
"",
" Setting up layer 'port-chooser'",
" Available at app launch: true",
Expand Down
2 changes: 1 addition & 1 deletion integration/node_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func testNodeApp(t *testing.T, context spec.G, it spec.S) {
docker = occam.NewDocker()
})

context("when building a .NET 6 + node app", func() {
context("when building a .NET 8 + node app", func() {
var (
image occam.Image
container occam.Container
Expand Down
6 changes: 3 additions & 3 deletions integration/self_contained_executable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ func testSelfContainedExecutable(t *testing.T, context spec.G, it spec.S) {
Expect(os.RemoveAll(source)).To(Succeed())
})

context("when the self-contained executable uses .NET 6", func() {
context("when the self-contained executable uses .NET 8", func() {
it("builds and runs successfully", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "self_contained_executable_6"))
source, err = occam.Source(filepath.Join("testdata", "self_contained_8"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand All @@ -72,7 +72,7 @@ func testSelfContainedExecutable(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("Hello, world!")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("Welcome")).OnPort(8080))
})
})
})
Expand Down
16 changes: 8 additions & 8 deletions integration/source_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ func testSourceApp(t *testing.T, context spec.G, it spec.S) {
Expect(os.RemoveAll(source)).To(Succeed())
})

context("when 'net6.0' is specified as the TargetFramework", func() {
context("when .NET 8 is the desired framework", func() {
it("builds and runs successfully", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "source_6"))
source, err = occam.Source(filepath.Join("testdata", "source_8"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand All @@ -75,7 +75,7 @@ func testSourceApp(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("source_6_app")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("Welcome")).OnPort(8080))
})

context("remote debugging is enabled", func() {
Expand All @@ -85,7 +85,7 @@ func testSourceApp(t *testing.T, context spec.G, it spec.S) {
})
it("builds and runs successfully", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "source_6"))
source, err = occam.Source(filepath.Join("testdata", "source_8"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand All @@ -112,7 +112,7 @@ func testSourceApp(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("source_6_app")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("Welcome")).OnPort(8080))

vsdbgContainer, err = docker.Container.Run.
WithEntrypoint("launcher").
Expand All @@ -129,10 +129,10 @@ func testSourceApp(t *testing.T, context spec.G, it spec.S) {
})
})

context("when .NET 8 is the desired framework", func() {
context("when .NET 9 is the desired framework", func() {
it("builds and runs successfully", func() {
var err error
source, err = occam.Source(filepath.Join("testdata", "source_8"))
source, err = occam.Source(filepath.Join("testdata", "source_9"))
Expect(err).NotTo(HaveOccurred())

var logs fmt.Stringer
Expand All @@ -155,7 +155,7 @@ func testSourceApp(t *testing.T, context spec.G, it spec.S) {
Execute(image.ID)
Expect(err).NotTo(HaveOccurred())

Eventually(container).Should(Serve(ContainSubstring("source_8")).OnPort(8080))
Eventually(container).Should(Serve(ContainSubstring("Welcome")).OnPort(8080))
})
})
})
Expand Down
7 changes: 0 additions & 7 deletions integration/testdata/fdd_6/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions integration/testdata/fdd_6/fde_dotnet_6.deps.json

This file was deleted.

Binary file removed integration/testdata/fdd_6/fde_dotnet_6.dll
Binary file not shown.
Binary file removed integration/testdata/fdd_6/fde_dotnet_6.pdb
Binary file not shown.
20 changes: 0 additions & 20 deletions integration/testdata/fdd_6/fde_dotnet_6.runtimeconfig.json

This file was deleted.

18 changes: 0 additions & 18 deletions integration/testdata/fdd_6/wwwroot/css/site.css

This file was deleted.

49 changes: 0 additions & 49 deletions integration/testdata/fdd_6/wwwroot/fde_dotnet_6.styles.css

This file was deleted.

4 changes: 0 additions & 4 deletions integration/testdata/fdd_6/wwwroot/js/site.js

This file was deleted.

This file was deleted.

Loading
Loading