forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#36834 from aloubyansky/3.2.8-backports-4
3.2.8 backports 4
- Loading branch information
Showing
36 changed files
with
399 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
devtools/maven/src/test/java/io/quarkus/maven/DeployerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package io.quarkus.maven; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import org.apache.maven.model.Dependency; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import io.quarkus.builder.Version; | ||
|
||
public class DeployerTest { | ||
|
||
@Test | ||
void shouldNotFindDeployer() { | ||
Set<String> deployers = Deployer.getProjecDeployers(List.of()); | ||
assertTrue(deployers.isEmpty()); | ||
|
||
deployers = Deployer.getProjecDeployers(List.of(newDependency("quarkus-arc"), newDependency("quarkus-resteasy"))); | ||
assertTrue(deployers.isEmpty()); | ||
} | ||
|
||
@Test | ||
void shouldFindDeployer() { | ||
Set<String> deployers = Deployer.getProjecDeployers( | ||
List.of(newDependency("quarkus-arc"), newDependency("quarkus-resteasy"), newDependency("quarkus-kubernetes"))); | ||
assertEquals(Set.of("kubernetes"), deployers); | ||
|
||
deployers = Deployer.getProjecDeployers( | ||
List.of(newDependency("quarkus-arc"), newDependency("quarkus-resteasy"), newDependency("quarkus-openshift"))); | ||
assertEquals(Set.of("openshift"), deployers); | ||
|
||
deployers = Deployer.getProjecDeployers( | ||
List.of(newDependency("quarkus-arc"), newDependency("quarkus-resteasy"), newDependency("quarkus-kind"))); | ||
assertEquals(Set.of("kind"), deployers); | ||
|
||
deployers = Deployer.getProjecDeployers( | ||
List.of(newDependency("quarkus-arc"), newDependency("quarkus-resteasy"), newDependency("quarkus-minikube"))); | ||
assertEquals(Set.of("minikube"), deployers); | ||
} | ||
|
||
@Test | ||
void shouldFindMultipleDeployer() { | ||
Set<String> deployers = Deployer.getProjecDeployers( | ||
List.of(newDependency("quarkus-arc"), newDependency("quarkus-resteasy"), newDependency("quarkus-kubernetes"), | ||
newDependency("quarkus-openshift"))); | ||
assertEquals(Set.of("kubernetes", "openshift"), deployers); | ||
} | ||
|
||
private static Dependency newDependency(String artifactId) { | ||
Dependency dependency = new Dependency(); | ||
dependency.setGroupId("io.quarkus"); | ||
dependency.setArtifactId(artifactId); | ||
dependency.setVersion(Version.getVersion()); | ||
dependency.setType("jar"); | ||
return dependency; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
.../src/main/java/io/quarkus/liquibase/runtime/graal/SubstituteEnvironmentValueProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.liquibase.runtime.graal; | ||
|
||
import java.util.Map; | ||
|
||
import com.oracle.svm.core.annotate.Delete; | ||
import com.oracle.svm.core.annotate.Substitute; | ||
import com.oracle.svm.core.annotate.TargetClass; | ||
|
||
@TargetClass(className = "liquibase.configuration.core.EnvironmentValueProvider") | ||
final class SubstituteEnvironmentValueProvider { | ||
|
||
@Delete | ||
private Map<String, String> environment; | ||
|
||
@Substitute | ||
protected Map<?, ?> getMap() { | ||
return System.getenv(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...yment/src/test/java/io/quarkus/oidc/token/propagation/CustomAccessTokenRequestFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.quarkus.oidc.token.propagation; | ||
|
||
public class CustomAccessTokenRequestFilter extends AccessTokenRequestFilter { | ||
|
||
@Override | ||
protected String getClientName() { | ||
return "exchange"; | ||
} | ||
|
||
@Override | ||
protected boolean isExchangeToken() { | ||
return true; | ||
} | ||
|
||
} |
Oops, something went wrong.