diff --git a/uploader/src/main/java/com/logscapeng/uploader/aws/AwsMetaDataQueryConverter.java b/uploader/src/main/java/com/logscapeng/uploader/aws/AwsMetaDataQueryConverter.java index eb0e272..6e32b2f 100644 --- a/uploader/src/main/java/com/logscapeng/uploader/aws/AwsMetaDataQueryConverter.java +++ b/uploader/src/main/java/com/logscapeng/uploader/aws/AwsMetaDataQueryConverter.java @@ -3,6 +3,7 @@ import com.logscapeng.uploader.FileMetaDataQueryService; import com.logscapeng.uploader.fixture.FixturedFileMetaDataQueryService; import com.logscapeng.uploader.fixture.FixturedStorageService; +import io.quarkus.runtime.LaunchMode; import org.eclipse.microprofile.config.spi.Converter; /** @@ -11,7 +12,7 @@ public class AwsMetaDataQueryConverter implements Converter { @Override public FileMetaDataQueryService convert(String s) { - if (s.equalsIgnoreCase("TEST")) { + if (s.equalsIgnoreCase(LaunchMode.TEST.name())) { return new FixturedFileMetaDataQueryService(); } return new AwsFileMetaDataQueryService(); diff --git a/uploader/src/main/java/com/logscapeng/uploader/aws/AwsStorageConverter.java b/uploader/src/main/java/com/logscapeng/uploader/aws/AwsStorageConverter.java index 0d2be58..2eb7c24 100644 --- a/uploader/src/main/java/com/logscapeng/uploader/aws/AwsStorageConverter.java +++ b/uploader/src/main/java/com/logscapeng/uploader/aws/AwsStorageConverter.java @@ -2,13 +2,14 @@ import com.logscapeng.uploader.Storage; import com.logscapeng.uploader.fixture.FixturedStorageService; +import io.quarkus.runtime.LaunchMode; import io.quarkus.runtime.configuration.ProfileManager; import org.eclipse.microprofile.config.spi.Converter; public class AwsStorageConverter implements Converter { @Override public Storage convert(String s) { - if (s.equals("TEST")) { + if (s.equalsIgnoreCase(LaunchMode.TEST.name())) { return new FixturedStorageService(); } return new AwsS3StorageService();