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

Sync with latest master #2200

Merged
merged 43 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
09ef5e6
Update accesslog_enabled test results on Wed Oct 16 02:03:09 UTC 2024
Oct 16, 2024
a1d7344
Update h1_h1_passthrough test results on Wed Oct 16 02:03:09 UTC 2024
Oct 16, 2024
24bc25d
Update h1_transformation test results on Wed Oct 16 02:03:09 UTC 2024
Oct 16, 2024
24d3fa9
Update h1c_h1c_passthrough test results on Wed Oct 16 02:03:09 UTC 2024
Oct 16, 2024
7b361f9
Update h1c_transformation test results on Wed Oct 16 02:03:09 UTC 2024
Oct 16, 2024
8bfc1be
Update h2_h1c_passthrough test results on Wed Oct 16 02:03:09 UTC 2024
Oct 16, 2024
587b89a
Update interceptors_passthrough test results on Wed Oct 16 02:03:09 U…
Oct 16, 2024
7343d37
Update observability_enabled test results on Wed Oct 16 02:03:09 UTC …
Oct 16, 2024
1afab50
Update snowpeak_passthrough test results on Wed Oct 16 02:03:09 UTC 2024
Oct 16, 2024
437770e
Merge pull request #2177 from ballerina-platform/load-test-results
ballerina-bot Oct 16, 2024
0fd3825
Update add header method to handle content-type headers
TharmiganK Oct 15, 2024
12df125
Add tests
TharmiganK Oct 15, 2024
b3c80ff
Update changelog
TharmiganK Oct 15, 2024
62def21
[Automated] Update the native jar versions
TharmiganK Oct 16, 2024
7905e2e
[Automated] Update the native jar versions
TharmiganK Oct 16, 2024
f648d03
Merge pull request #2178 from ballerina-platform/fix-add-header
TharmiganK Oct 16, 2024
6dcb49e
Update accesslog_enabled test results on Thu Oct 17 02:03:43 UTC 2024
Oct 17, 2024
df9bf72
Update h1_h1_passthrough test results on Thu Oct 17 02:03:43 UTC 2024
Oct 17, 2024
68b4874
Update h1_transformation test results on Thu Oct 17 02:03:43 UTC 2024
Oct 17, 2024
380acee
Update h1c_h1c_passthrough test results on Thu Oct 17 02:03:43 UTC 2024
Oct 17, 2024
2e986d5
Update h1c_transformation test results on Thu Oct 17 02:03:43 UTC 2024
Oct 17, 2024
de7b35c
Update h2_h1c_passthrough test results on Thu Oct 17 02:03:43 UTC 2024
Oct 17, 2024
b00eb95
Update interceptors_passthrough test results on Thu Oct 17 02:03:43 U…
Oct 17, 2024
455db01
Update observability_enabled test results on Thu Oct 17 02:03:43 UTC …
Oct 17, 2024
61a41b3
Update snowpeak_passthrough test results on Thu Oct 17 02:03:44 UTC 2024
Oct 17, 2024
3662203
Merge pull request #2187 from ballerina-platform/load-test-results
ballerina-bot Oct 17, 2024
a4e29f6
Update accesslog_enabled test results on Fri Oct 18 02:05:12 UTC 2024
Oct 18, 2024
d912fdc
Update h1_h1_passthrough test results on Fri Oct 18 02:05:12 UTC 2024
Oct 18, 2024
240eca1
Update h1_transformation test results on Fri Oct 18 02:05:12 UTC 2024
Oct 18, 2024
fe6ce33
Update h1c_h1c_passthrough test results on Fri Oct 18 02:05:12 UTC 2024
Oct 18, 2024
44c14bd
Update h1c_transformation test results on Fri Oct 18 02:05:12 UTC 2024
Oct 18, 2024
0d99182
Update h2_h1c_passthrough test results on Fri Oct 18 02:05:12 UTC 2024
Oct 18, 2024
94381cf
Update interceptors_passthrough test results on Fri Oct 18 02:05:13 U…
Oct 18, 2024
19a313c
Update observability_enabled test results on Fri Oct 18 02:05:13 UTC …
Oct 18, 2024
765fe10
Update snowpeak_passthrough test results on Fri Oct 18 02:05:13 UTC 2024
Oct 18, 2024
575deee
Merge pull request #2190 from ballerina-platform/load-test-results
TharmiganK Oct 21, 2024
a1a43b1
Add Java21 branch support
TharmiganK Oct 22, 2024
aadb375
Update next minor version
TharmiganK Oct 22, 2024
09df93b
[Automated] Update the native jar versions
TharmiganK Oct 22, 2024
ddb6806
[Automated] Update the native jar versions
TharmiganK Oct 22, 2024
56b0d3d
Merge pull request #2197 from ballerina-platform/update-minor-version
TharmiganK Oct 22, 2024
2267e56
Merge pull request #2196 from ballerina-platform/TharmiganK-patch-1
TharmiganK Oct 22, 2024
a25d5ed
Merge with latest master
warunalakshitha Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-with-bal-test-graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:
- 2201.7.x
- 2201.8.x
- 2201.9.x
- java21
types: [opened, synchronize, reopened, labeled, unlabeled]

concurrency:
Expand Down
6 changes: 3 additions & 3 deletions ballerina-tests/http-advanced-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
org = "ballerina"
name = "http_advanced_tests"
version = "2.12.1"
version = "2.13.0"

[[dependency]]
org = "ballerina"
name = "http_test_common"
repository = "local"
version = "2.12.1"
version = "2.13.0"

[platform.java21]
graalvmCompatible = true

[[platform.java21.dependency]]
scope = "testOnly"
path = "../../test-utils/build/libs/http-test-utils-2.12.1-SNAPSHOT.jar"
path = "../../test-utils/build/libs/http-test-utils-2.13.0-SNAPSHOT.jar"
6 changes: 3 additions & 3 deletions ballerina-tests/http-advanced-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
Expand Down Expand Up @@ -104,7 +104,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_advanced_tests"
version = "2.12.1"
version = "2.13.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "file"},
Expand All @@ -124,7 +124,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_test_common"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "http"},
Expand Down
6 changes: 3 additions & 3 deletions ballerina-tests/http-client-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
org = "ballerina"
name = "http_client_tests"
version = "2.12.1"
version = "2.13.0"

[[dependency]]
org = "ballerina"
name = "http_test_common"
repository = "local"
version = "2.12.1"
version = "2.13.0"

[platform.java21]
graalvmCompatible = true

[[platform.java21.dependency]]
scope = "testOnly"
path = "../../test-utils/build/libs/http-test-utils-2.12.1-SNAPSHOT.jar"
path = "../../test-utils/build/libs/http-test-utils-2.13.0-SNAPSHOT.jar"
6 changes: 3 additions & 3 deletions ballerina-tests/http-client-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
Expand Down Expand Up @@ -101,7 +101,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_client_tests"
version = "2.12.1"
version = "2.13.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "http"},
Expand All @@ -120,7 +120,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_test_common"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "http"},
Expand Down
6 changes: 3 additions & 3 deletions ballerina-tests/http-dispatching-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
org = "ballerina"
name = "http_dispatching_tests"
version = "2.12.1"
version = "2.13.0"

[[dependency]]
org = "ballerina"
name = "http_test_common"
repository = "local"
version = "2.12.1"
version = "2.13.0"

[platform.java21]
graalvmCompatible = true

[[platform.java21.dependency]]
scope = "testOnly"
path = "../../test-utils/build/libs/http-test-utils-2.12.1-SNAPSHOT.jar"
path = "../../test-utils/build/libs/http-test-utils-2.13.0-SNAPSHOT.jar"
6 changes: 3 additions & 3 deletions ballerina-tests/http-dispatching-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
Expand Down Expand Up @@ -101,7 +101,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_dispatching_tests"
version = "2.12.1"
version = "2.13.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "http"},
Expand All @@ -123,7 +123,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_test_common"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "http"},
Expand Down
6 changes: 3 additions & 3 deletions ballerina-tests/http-interceptor-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
org = "ballerina"
name = "http_interceptor_tests"
version = "2.12.1"
version = "2.13.0"

[[dependency]]
org = "ballerina"
name = "http_test_common"
repository = "local"
version = "2.12.1"
version = "2.13.0"

[platform.java21]
graalvmCompatible = true

[[platform.java21.dependency]]
scope = "testOnly"
path = "../../test-utils/build/libs/http-test-utils-2.12.1-SNAPSHOT.jar"
path = "../../test-utils/build/libs/http-test-utils-2.13.0-SNAPSHOT.jar"
6 changes: 3 additions & 3 deletions ballerina-tests/http-interceptor-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
Expand Down Expand Up @@ -98,7 +98,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_interceptor_tests"
version = "2.12.1"
version = "2.13.0"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerina", name = "http_test_common"},
Expand All @@ -114,7 +114,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_test_common"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "http"},
Expand Down
6 changes: 3 additions & 3 deletions ballerina-tests/http-misc-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
org = "ballerina"
name = "http_misc_tests"
version = "2.12.1"
version = "2.13.0"

[[dependency]]
org = "ballerina"
name = "http_test_common"
repository = "local"
version = "2.12.1"
version = "2.13.0"

[platform.java21]
graalvmCompatible = true

[[platform.java21.dependency]]
scope = "testOnly"
path = "../../test-utils/build/libs/http-test-utils-2.12.1-SNAPSHOT.jar"
path = "../../test-utils/build/libs/http-test-utils-2.13.0-SNAPSHOT.jar"
6 changes: 3 additions & 3 deletions ballerina-tests/http-misc-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
Expand Down Expand Up @@ -98,7 +98,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_misc_tests"
version = "2.12.1"
version = "2.13.0"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerina", name = "http_test_common"},
Expand All @@ -117,7 +117,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_test_common"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "http"},
Expand Down
22 changes: 22 additions & 0 deletions ballerina-tests/http-misc-tests/tests/http_header_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// specific language governing permissions and limitations
// under the License.

import ballerina/mime;
import ballerina/test;
import ballerina/http;
import ballerina/http_test_common as common;
Expand Down Expand Up @@ -276,6 +277,27 @@ function testPassthruWithBody() returns error? {
}
}

@test:Config {}
function testAddHeaderWithContentType() returns error? {
http:Request req = new;
check req.setContentType(mime:APPLICATION_JSON);
test:assertEquals(check req.getHeaders(http:CONTENT_TYPE), [mime:APPLICATION_JSON]);
req.addHeader(http:CONTENT_TYPE, mime:APPLICATION_XML);
test:assertEquals(check req.getHeaders(http:CONTENT_TYPE), [mime:APPLICATION_XML]);

http:Response res = new;
check res.setContentType(mime:APPLICATION_JSON);
test:assertEquals(check res.getHeaders(http:CONTENT_TYPE), [mime:APPLICATION_JSON]);
res.addHeader(http:CONTENT_TYPE, mime:APPLICATION_XML);
test:assertEquals(check res.getHeaders(http:CONTENT_TYPE), [mime:APPLICATION_XML]);

http:PushPromise pushPromise = new;
pushPromise.addHeader(http:CONTENT_TYPE, mime:APPLICATION_JSON);
test:assertEquals(pushPromise.getHeaders(http:CONTENT_TYPE), [mime:APPLICATION_JSON]);
pushPromise.addHeader(http:CONTENT_TYPE, mime:APPLICATION_XML);
test:assertEquals(pushPromise.getHeaders(http:CONTENT_TYPE), [mime:APPLICATION_XML]);
}

type Headers record {|
@http:Header {name: "X-API-VERSION"}
string apiVersion;
Expand Down
6 changes: 3 additions & 3 deletions ballerina-tests/http-resiliency-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
org = "ballerina"
name = "http_resiliency_tests"
version = "2.12.1"
version = "2.13.0"

[[dependency]]
org = "ballerina"
name = "http_test_common"
repository = "local"
version = "2.12.1"
version = "2.13.0"

[platform.java21]
graalvmCompatible = true

[[platform.java21.dependency]]
scope = "testOnly"
path = "../../test-utils/build/libs/http-test-utils-2.12.1-SNAPSHOT.jar"
path = "../../test-utils/build/libs/http-test-utils-2.13.0-SNAPSHOT.jar"
6 changes: 3 additions & 3 deletions ballerina-tests/http-resiliency-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
Expand Down Expand Up @@ -98,7 +98,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_resiliency_tests"
version = "2.12.1"
version = "2.13.0"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerina", name = "http_test_common"},
Expand All @@ -115,7 +115,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_test_common"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "http"},
Expand Down
6 changes: 3 additions & 3 deletions ballerina-tests/http-security-tests/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
org = "ballerina"
name = "http_security_tests"
version = "2.12.1"
version = "2.13.0"

[[dependency]]
org = "ballerina"
name = "http_test_common"
repository = "local"
version = "2.12.1"
version = "2.13.0"

[platform.java21]
graalvmCompatible = true

[[platform.java21.dependency]]
scope = "testOnly"
path = "../../test-utils/build/libs/http-test-utils-2.12.1-SNAPSHOT.jar"
path = "../../test-utils/build/libs/http-test-utils-2.13.0-SNAPSHOT.jar"
6 changes: 3 additions & 3 deletions ballerina-tests/http-security-tests/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "auth"},
Expand Down Expand Up @@ -101,7 +101,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_security_tests"
version = "2.12.1"
version = "2.13.0"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "http"},
Expand All @@ -119,7 +119,7 @@ modules = [
[[package]]
org = "ballerina"
name = "http_test_common"
version = "2.12.1"
version = "2.13.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "http"},
Expand Down
Loading
Loading