Skip to content

Commit

Permalink
Merge pull request #1335 from MohamedSabthar/test-enable
Browse files Browse the repository at this point in the history
Enable the disabled test cases during update 11 migration
  • Loading branch information
MohamedSabthar authored Jan 2, 2025
2 parents c7625c1 + 75ff126 commit eb47c2d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 37 deletions.
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-20241218-101200-109f6cc7"

[[package]]
org = "ballerina"
Expand Down
36 changes: 12 additions & 24 deletions ballerina/tests/client_oauth2_provider_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import ballerina/lang.runtime as runtime;

// Test the client credentials grant type with valid credentials
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testClientCredentialsGrantType1() returns Error? {
ClientCredentialsGrantConfig config = {
Expand Down Expand Up @@ -54,8 +53,7 @@ isolated function testClientCredentialsGrantType1() returns Error? {

// Test the client credentials grant type with invalid client credentials
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testClientCredentialsGrantType2() {
ClientCredentialsGrantConfig config = {
Expand Down Expand Up @@ -91,8 +89,7 @@ isolated function testClientCredentialsGrantType2() {

// Test the client credentials grant type with valid client-id and invalid client-secret
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testClientCredentialsGrantType3() {
ClientCredentialsGrantConfig config = {
Expand Down Expand Up @@ -204,8 +201,7 @@ isolated function testClientCredentialsGrantType5() returns Error? {

// Test the password grant type with valid credentials
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testPasswordGrantType1() returns Error? {
PasswordGrantConfig config = {
Expand Down Expand Up @@ -294,8 +290,7 @@ isolated function testPasswordGrantType2() returns Error? {

// Test the password grant type with an invalid username, password, and a valid refresh config
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testPasswordGrantType3() {
PasswordGrantConfig config = {
Expand Down Expand Up @@ -381,8 +376,7 @@ isolated function testPasswordGrantType4() {

// Test the password grant type with an valid username, password, and without client-id and client-secret
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testPasswordGrantType5() {
PasswordGrantConfig config = {
Expand Down Expand Up @@ -561,8 +555,7 @@ isolated function testPasswordGrantType9() returns Error? {

// Test the refresh token grant type with an invalid refresh token
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testRefreshTokenGrantType1() {
RefreshTokenGrantConfig config = {
Expand Down Expand Up @@ -657,8 +650,7 @@ isolated function testRefreshTokenGrantType3() {

// Test the refresh token grant type with invalid client-id and client-secret
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testRefreshTokenGrantType4() {
RefreshTokenGrantConfig config = {
Expand Down Expand Up @@ -734,8 +726,7 @@ isolated function testJwtBearerGrantType1() returns Error? {

// Test the JWT bearer grant type with an valid JWT (different issuer)
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testJwtBearerGrantType2() {
string jwt = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxN" +
Expand Down Expand Up @@ -765,8 +756,7 @@ isolated function testJwtBearerGrantType2() {

// Test the JWT bearer grant type with an invalid assertion
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testJwtBearerGrantType3() {
JwtBearerGrantConfig config = {
Expand Down Expand Up @@ -836,8 +826,7 @@ isolated function testJwtBearerGrantType4() {

// Test the JWT bearer grant type with an valid JWT, and without client-id and client-secret
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testJwtBearerGrantType5() {
string jwt = "eyJhbGciOiJSUzI1NiIsICJ0eXAiOiJKV1QiLCAia2lkIjoiTXpZeE1tRmtPR1l3TVdJMFpXTm1ORGN4TkdZd1ltTTRaVEEzTV" +
Expand Down Expand Up @@ -870,8 +859,7 @@ isolated function testJwtBearerGrantType5() {

// Test the JWT bearer grant type with invalid client-id and client-secret
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testJwtBearerGrantType6() {
string jwt = "eyJhbGciOiJSUzI1NiIsICJ0eXAiOiJKV1QiLCAia2lkIjoiTXpZeE1tRmtPR1l3TVdJMFpXTm1ORGN4TkdZd1ltTTRaVEEzTV" +
Expand Down
18 changes: 6 additions & 12 deletions ballerina/tests/listener_oauth2_provider_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ isolated function getAccessToken() returns string|Error {

// Test the introspection request with successful token
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testTokenIntrospection1() returns Error? {
string accessToken = check getAccessToken();
Expand All @@ -65,8 +64,7 @@ isolated function testTokenIntrospection1() returns Error? {

// Test the introspection request with successful token with cache configurations
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testTokenIntrospection2() returns Error? {
string accessToken = check getAccessToken();
Expand Down Expand Up @@ -111,8 +109,7 @@ isolated function testTokenIntrospection2() returns Error? {

// Test the introspection request with invalid token
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testTokenIntrospection3() returns Error? {
string accessToken = "invalid_token";
Expand Down Expand Up @@ -154,8 +151,7 @@ isolated function testTokenIntrospection4() {

// Test the introspection request with successful token without authenticating the client
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testTokenIntrospection5() returns Error? {
string accessToken = check getAccessToken();
Expand All @@ -178,8 +174,7 @@ isolated function testTokenIntrospection5() returns Error? {

// Test the introspection request with successful token with invalid OAuth2 client credentials grant type
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testTokenIntrospection6() {
IntrospectionConfig config = {
Expand Down Expand Up @@ -210,8 +205,7 @@ isolated function testTokenIntrospection6() {

// Test the introspection request with successful token with invalid OAuth2 password grant type
@test:Config {
groups: ["skipOnWindows"],
enable: false
groups: ["skipOnWindows"]
}
isolated function testTokenIntrospection7() {
IntrospectionConfig config = {
Expand Down

0 comments on commit eb47c2d

Please sign in to comment.