Class TestValueRegistryConfigSource

java.lang.Object
io.smallrye.config.common.AbstractConfigSource
io.quarkus.test.config.TestValueRegistryConfigSource
All Implemented Interfaces:
Serializable, org.eclipse.microprofile.config.spi.ConfigSource

public class TestValueRegistryConfigSource extends io.smallrye.config.common.AbstractConfigSource
A ConfigSource to bridge between the Config System and ValueRegistry. This allows the use of SmallRyeConfig to look up values from ValueRegistry in Integration tests.

While ValueRegistry shouldn't be exposed in the Config System, this is intended to work as a temporary compatibility layer, since until the introduction of ValueRegistry, the norm was to use SmallRyeConfig and System Properties to relay this kind of information, which will be moved to ValueRegistry, so we need this not to break code that is still relying on the Config system.

This should be kept until we decide on an alternate solution in the discussion #46915.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.junit.jupiter.api.extension.ExtensionContext.Namespace
     

    Fields inherited from interface org.eclipse.microprofile.config.spi.ConfigSource

    CONFIG_ORDINAL, DEFAULT_ORDINAL
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestValueRegistryConfigSource(org.junit.platform.engine.support.store.NamespacedHierarchicalStore<org.junit.platform.engine.support.store.Namespace> store)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    getValue(String propertyName)
     

    Methods inherited from class io.smallrye.config.common.AbstractConfigSource

    getName, getOrdinal, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.microprofile.config.spi.ConfigSource

    getProperties
  • Field Details

    • CONFIG

      public static final org.junit.jupiter.api.extension.ExtensionContext.Namespace CONFIG
  • Constructor Details

    • TestValueRegistryConfigSource

      TestValueRegistryConfigSource(org.junit.platform.engine.support.store.NamespacedHierarchicalStore<org.junit.platform.engine.support.store.Namespace> store)
  • Method Details

    • getPropertyNames

      public Set<String> getPropertyNames()
    • getValue

      public String getValue(String propertyName)