diff options
author | Steve Marion <steve.marion@sonarsource.com> | 2024-12-13 16:59:39 +0100 |
---|---|---|
committer | Steve Marion <steve.marion@sonarsource.com> | 2024-12-18 11:13:23 +0100 |
commit | a248ce5944e501734b7616b15afcc9ef1e48089b (patch) | |
tree | f0f2c08986c70b392d59cd050ef43d666d218555 /sonar-scanner-engine/src | |
parent | 6701f15cfbc984d3832f6c5685650340648fe67b (diff) | |
download | sonarqube-a248ce5944e501734b7616b15afcc9ef1e48089b.tar.gz sonarqube-a248ce5944e501734b7616b15afcc9ef1e48089b.zip |
NO-JIRA fix GithubActionsTest resources
Diffstat (limited to 'sonar-scanner-engine/src')
-rw-r--r-- | sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/vendors/GithubActionsTest.java | 4 | ||||
-rw-r--r-- | sonar-scanner-engine/src/test/resources/org/sonar/scanner/ci/vendors/pull_request_event.json (renamed from sonar-scanner-engine/src/main/resources/org/sonar/scanner/ci/providers/GithubActionsTest/pull_request_event.json) | 0 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/vendors/GithubActionsTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/vendors/GithubActionsTest.java index 4619f3918f2..57a1b3cc4c1 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/vendors/GithubActionsTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/ci/vendors/GithubActionsTest.java @@ -77,7 +77,7 @@ class GithubActionsTest { @Test void loadConfiguration_whenIsAPullRequest_ThenGetRevisionFromPullRequest() throws IOException { - prepareEvent("org/sonar/scanner/ci/providers/GithubActionsTest/pull_request_event.json", "pull_request"); + prepareEvent("pull_request_event.json", "pull_request"); setEnvVariable(GITHUB_SHA, "abd12fc"); setEnvVariable(GITHUB_API_URL_ENV_VAR, GITHUB_API_URL); setEnvVariable(GITHUB_REPOSITORY_ENV_VAR, REPOSITORY); @@ -131,6 +131,6 @@ class GithubActionsTest { } private static String readTestResource(String filename) throws IOException { - return IOUtils.toString(Objects.requireNonNull(GithubActionsTest.class.getClassLoader().getResource(filename)), UTF_8); + return IOUtils.toString(Objects.requireNonNull(GithubActionsTest.class.getResource(filename)), UTF_8); } } diff --git a/sonar-scanner-engine/src/main/resources/org/sonar/scanner/ci/providers/GithubActionsTest/pull_request_event.json b/sonar-scanner-engine/src/test/resources/org/sonar/scanner/ci/vendors/pull_request_event.json index 2e8a39c2e3f..2e8a39c2e3f 100644 --- a/sonar-scanner-engine/src/main/resources/org/sonar/scanner/ci/providers/GithubActionsTest/pull_request_event.json +++ b/sonar-scanner-engine/src/test/resources/org/sonar/scanner/ci/vendors/pull_request_event.json |