| 146 | }; |
| 147 | |
| 148 | TEST_F(AccessServerMetaOpts, parse_meta) |
| 149 | { |
| 150 | for (const auto &tc : GetMustFindOptions()) |
| 151 | { |
| 152 | Option opt = options.get(tc.key); |
| 153 | |
| 154 | EXPECT_STREQ(tc.key.c_str(), opt.get(0, 64).c_str()); |
| 155 | EXPECT_STREQ(tc.value.c_str(), opt.get(1, 64).c_str()); |
| 156 | } |
| 157 | |
| 158 | // All meta variabibles will be visible in the openvpn::OptionList |
| 159 | // class (which OptionListJSON extends). Check that all of them |
| 160 | // are present |
| 161 | for (const auto &key : GetIgnoredOptions()) |
| 162 | { |
| 163 | const Option *opt = options.get_ptr(key); |
| 164 | EXPECT_NE(opt, (Option *)NULL) |
| 165 | << "Option '" << key << "'" |
| 166 | << " was not found in the parsed OptionListJSON object"; |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | TEST_F(AccessServerMetaOpts, json_export) |
| 171 | { |
nothing calls this directly
no test coverage detected