| 40 | } |
| 41 | |
| 42 | Optional<KnobValue> TestKnobCollection::tryParseKnobValue(std::string const& knobName, |
| 43 | std::string const& knobValue) const { |
| 44 | auto result = serverKnobCollection.tryParseKnobValue(knobName, knobValue); |
| 45 | if (result.present()) { |
| 46 | return result; |
| 47 | } |
| 48 | auto parsedKnobValue = testKnobs.parseKnobValue(knobName, knobValue); |
| 49 | if (!std::holds_alternative<NoKnobFound>(parsedKnobValue)) { |
| 50 | return KnobValueRef::create(parsedKnobValue); |
| 51 | } |
| 52 | return {}; |
| 53 | } |
| 54 | |
| 55 | bool TestKnobCollection::trySetKnob(std::string const& knobName, KnobValueRef const& knobValue) { |
| 56 | return serverKnobCollection.trySetKnob(knobName, knobValue) || knobValue.visitSetKnob(knobName, testKnobs); |
nothing calls this directly
no test coverage detected