Skip to content

Commit

Permalink
Merge pull request #2258 from lnash94/enable-test
Browse files Browse the repository at this point in the history
[master] Enable negative tests
  • Loading branch information
TharmiganK authored Dec 16, 2024
2 parents 1b8535c + 03e9da0 commit c8fb1ff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ public function testSendingClosedRecordTable() returns error? {
]);
}

@test:Config { enable: false}
@test:Config {}
public function testRequestAnydataNegative() returns error? {
json[] x = [];
x.push(x);
json|error payload = outRequestClient->post("/mytest/json", x);
if payload is error {
if payload is http:InitializingOutboundRequestError {
test:assertEquals(payload.message(), "json conversion error: {ballerina/lang.value}CyclicValueReferenceError");
test:assertEquals(payload.message(), "json conversion error: the value has a cyclic reference");
return;
}
}
Expand Down Expand Up @@ -472,12 +472,12 @@ public function testGettingClosedRecordArray() returns error? {
]);
}

@test:Config {enable: false}
@test:Config {}
public function testResponseAnydataNegative() returns error? {
http:Response resp = check outRequestClient->get("/mytest/anydataNegative");
test:assertEquals(resp.statusCode, 500, msg = "Found unexpected output");
common:assertHeaderValue(check resp.getHeader(common:CONTENT_TYPE), common:APPLICATION_JSON);
check common:assertJsonErrorPayload(check resp.getJsonPayload(), "json conversion error: {ballerina/lang.value}CyclicValueReferenceError",
check common:assertJsonErrorPayload(check resp.getJsonPayload(), "json conversion error: the value has a cyclic reference",
"Internal Server Error", 500, "/mytest/anydataNegative", "GET");
}

Expand Down
2 changes: 1 addition & 1 deletion ballerina-tests/http-test-common/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.11.0-20241121-075100-c4c87cbc"
distribution-version = "2201.11.0-20241209-162400-0c015833"

[[package]]
org = "ballerina"
Expand Down
4 changes: 2 additions & 2 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ path = "../native/build/libs/http-native-2.13.0-SNAPSHOT.jar"
groupId = "io.ballerina.stdlib"
artifactId = "mime-native"
version = "2.11.0"
path = "./lib/mime-native-2.11.0-20241204-145000-6cef6a1.jar"
path = "./lib/mime-native-2.11.0-20241209-180600-aa73132.jar"

[[platform.java21.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "constraint-native"
version = "1.6.0"
path = "./lib/constraint-native-1.6.0-20241122-133100-98689e2.jar"
path = "./lib/constraint-native-1.6.0-20241209-172100-2facdca.jar"

[[platform.java21.dependency]]
groupId = "io.netty"
Expand Down
2 changes: 1 addition & 1 deletion ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.11.0-20241121-075100-c4c87cbc"
distribution-version = "2201.11.0-20241209-162400-0c015833"

[[package]]
org = "ballerina"
Expand Down

0 comments on commit c8fb1ff

Please sign in to comment.