Skip to content

Commit

Permalink
upgrade to Java 21 and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBredl committed Feb 6, 2024
1 parent 79511f8 commit 33a8699
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
uses: gradle/wrapper-validation-action@v2
- name: Run chmod to make gradlew executable
run: chmod +x gradlew
- name: Execute tests
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
uses: gradle/gradle-build-action@v3
with:
arguments: cleanTest test
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.6'
id 'io.spring.dependency-management' version '1.1.0'
id "io.github.kobylynskyi.graphql.codegen" version "5.7.2"
id 'org.springframework.boot' version '3.+'
id 'io.spring.dependency-management' version '1.+'
id "io.github.kobylynskyi.graphql.codegen" version "5.+"
}

group = 'de.unistuttgart.iste.gits'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
sourceCompatibility = '21'

// Automatically generate DTOs from GraphQL schema:
graphqlCodegen {
Expand Down Expand Up @@ -48,16 +48,16 @@ repositories {
}

dependencies {
implementation 'de.unistuttgart.iste.gits:gits-common:0.6.4'
implementation 'de.unistuttgart.iste.gits:gits-common:1.0.0'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-graphql'
implementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.graphql:spring-graphql-test'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
implementation "org.testcontainers:postgresql:1.18.3"
implementation "org.testcontainers:junit-jupiter:1.18.3"
implementation "org.testcontainers:postgresql:1.+"
implementation "org.testcontainers:junit-jupiter:1.+"
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public class AuthorizationAsserts {
*/
public static void assertIsMissingUserRoleError(final List<ResponseError> graphqlErrors) {
assertThat(graphqlErrors, hasSize(1));
assertThat(graphqlErrors.get(0).getExtensions().get("exception"), is("NoAccessToCourseException"));
assertThat(graphqlErrors.get(0).getMessage(), containsString("User does not have the required role to access this data of the course."));

assertThat(graphqlErrors.getFirst().getExtensions().get("exception"), is("NoAccessToCourseException"));
assertThat(graphqlErrors.getFirst().getMessage(), containsString("User does not have the required role to access this data of the course."));
}
}

0 comments on commit 33a8699

Please sign in to comment.