Skip to content

Commit 8b17b60

Browse files
Merge pull request #30401 from rhdmalone/update-tests-to-dotnet-8
OCPBUGS-63333: Add Dot Net 9.0 to Origin Tests
2 parents 1f66b70 + 41f27d2 commit 8b17b60

File tree

7 files changed

+128
-20
lines changed

7 files changed

+128
-20
lines changed

examples/image-streams/image-streams-centos7.json

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
{
2121
"name": "latest",
2222
"annotations": {
23-
"description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/6.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.",
23+
"description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.",
2424
"iconClass": "icon-dotnet",
2525
"openshift.io/display-name": ".NET (Latest)",
2626
"sampleContextDir": "app",
27-
"sampleRef": "dotnet-6.0",
27+
"sampleRef": "dotnet-9.0",
2828
"sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex",
2929
"supports": "dotnet",
3030
"tags": "builder,.net,dotnet,dotnetcore,hidden"
3131
},
3232
"from": {
3333
"kind": "ImageStreamTag",
34-
"name": "6.0-ubi8"
34+
"name": "9.0-ubi8"
3535
},
3636
"generation": null,
3737
"importPolicy": {},
@@ -85,6 +85,52 @@
8585
"type": "Local"
8686
}
8787
},
88+
{
89+
"name": "9.0-ubi8",
90+
"annotations": {
91+
"description": "Build and run .NET 9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.",
92+
"iconClass": "icon-dotnet",
93+
"openshift.io/display-name": ".NET 9 (UBI 8)",
94+
"sampleContextDir": "app",
95+
"sampleRef": "dotnet-9.0",
96+
"sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex",
97+
"supports": "dotnet:9.0,dotnet",
98+
"tags": "builder,.net,dotnet,dotnetcore,dotnet90",
99+
"version": "9.0"
100+
},
101+
"from": {
102+
"kind": "DockerImage",
103+
"name": "registry.access.redhat.com/ubi8/dotnet-90:9.0"
104+
},
105+
"generation": null,
106+
"importPolicy": {},
107+
"referencePolicy": {
108+
"type": "Local"
109+
}
110+
},
111+
{
112+
"name": "9.0",
113+
"annotations": {
114+
"description": "Build and run .NET 9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.",
115+
"iconClass": "icon-dotnet",
116+
"openshift.io/display-name": ".NET 9 (UBI 8)",
117+
"sampleContextDir": "app",
118+
"sampleRef": "dotnetcore-9.0",
119+
"sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex",
120+
"supports": "dotnet:9.0,dotnet",
121+
"tags": "builder,.net,dotnet,dotnetcore,dotnet90,hidden",
122+
"version": "9.0"
123+
},
124+
"from": {
125+
"kind": "DockerImage",
126+
"name": "registry.access.redhat.com/ubi8/dotnet-90:9.0"
127+
},
128+
"generation": null,
129+
"importPolicy": {},
130+
"referencePolicy": {
131+
"type": "Local"
132+
}
133+
},
88134
{
89135
"name": "3.1-ubi8",
90136
"annotations": {

examples/quickstarts/django-postgresql-persistent.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@
484484
{
485485
"name": "SOURCE_REPOSITORY_REF",
486486
"displayName": "Git Reference",
487-
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch."
487+
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
488+
"value": "4.2.x"
488489
},
489490
{
490491
"name": "CONTEXT_DIR",

examples/quickstarts/django-postgresql.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@
458458
{
459459
"name": "SOURCE_REPOSITORY_REF",
460460
"displayName": "Git Reference",
461-
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch."
461+
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
462+
"value": "4.2.x"
462463
},
463464
{
464465
"name": "CONTEXT_DIR",

test/extended/image_ecosystem/s2i_images.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,17 +252,17 @@ var s2iImages = map[string][]tc{
252252
},
253253
"dotnet": {
254254
{
255-
Version: "60",
255+
Version: "90",
256256
Cmd: "dotnet --version",
257-
Expected: "6.0",
258-
Tag: "6.0-ubi8",
257+
Expected: "9.0",
258+
Tag: "9.0-ubi8",
259259
Arches: []string{"amd64", "arm64", "s390x"},
260260
},
261261
// {
262-
// Version: "80",
262+
// Version: "100",
263263
// Cmd: "dotnet --version",
264-
// Expected: "8.0",
265-
// Tag: "8.0-ubi8",
264+
// Expected: "10.0",
265+
// Tag: "10.0-ubi8",
266266
// Arches: []string{"amd64", "arm64", "ppc64le", "s390x"},
267267
// },
268268
},

test/extended/image_ecosystem/scl.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,20 @@ func defineTest(name string, t tc, oc *exutil.CLI) {
5555
}
5656
e2e.Logf("%s:%s passed architecture compatibility", name, t.Tag)
5757
g.By(fmt.Sprintf("creating a sample pod for %q", t.DockerImageReference))
58-
pod := exutil.GetPodForContainer(kapiv1.Container{
58+
container := kapiv1.Container{
5959
Name: "test",
6060
Image: t.DockerImageReference,
61-
})
61+
}
62+
63+
// For .NET 9.0, explicitly run the usage script to work around Terminal Logger issues
64+
// See: https://developers.redhat.com/articles/2024/11/15/net-9-now-available-rhel-and-openshift
65+
if name == "dotnet" && strings.Contains(t.Tag, "9.0") {
66+
e2e.Logf("Setting explicit command for .NET 9.0 to run usage script")
67+
container.Command = []string{"/usr/libexec/s2i/usage"}
68+
}
69+
70+
pod := exutil.GetPodForContainer(container)
71+
6272
_, err := oc.KubeClient().CoreV1().Pods(oc.Namespace()).Create(context.Background(), pod, metav1.CreateOptions{})
6373
o.Expect(err).NotTo(o.HaveOccurred())
6474

test/extended/testdata/bindata.go

Lines changed: 55 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/extended/testdata/cluster/quickstarts/django-postgresql.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@
458458
{
459459
"name": "SOURCE_REPOSITORY_REF",
460460
"displayName": "Git Reference",
461-
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch."
461+
"description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
462+
"value": "4.2.x"
462463
},
463464
{
464465
"name": "CONTEXT_DIR",

0 commit comments

Comments
 (0)