Merge remote-tracking branch 'upstream/main' into aeisenberg/ff-refactoring

This commit is contained in:
Andrew Eisenberg 2022-10-07 13:41:50 -07:00
commit 919e4caca1
12 changed files with 86 additions and 47 deletions

View file

@ -36,7 +36,7 @@ for (const variant of ALL_FEATURE_FLAGS_DISABLED_VARIANTS) {
}
t.assert(loggedMessages.find((v) => v.type === "debug" &&
v.message ===
"Not running against github.com. Disabling all feature flags.") !== undefined);
"Not running against github.com. Disabling all toggleable features.") !== undefined);
});
});
}
@ -69,7 +69,7 @@ for (const variant of ALL_FEATURE_FLAGS_DISABLED_VARIANTS) {
const featureFlags = setUpTests(tmpDir);
(0, testing_utils_1.mockFeatureFlagApiEndpoint)(500, {});
await t.throwsAsync(async () => featureFlags.getValue(feature_flags_1.Feature.MlPoweredQueriesEnabled, includeCodeQlIfRequired(feature_flags_1.Feature.MlPoweredQueriesEnabled)), {
message: "Encountered an error while trying to load feature flags: Error: some error message",
message: "Encountered an error while trying to determine feature enablement: Error: some error message",
});
});
});
@ -123,7 +123,7 @@ for (const featureFlag of Object.keys(feature_flags_1.featureConfig)) {
const expectedFeatureFlags = initializeFeatures(true);
(0, testing_utils_1.mockFeatureFlagApiEndpoint)(200, expectedFeatureFlags);
await t.throwsAsync(async () => featureFlags.getValue(featureFlag), {
message: `Internal error: A minimum version is specified for feature flag ${featureFlag}, but no instance of CodeQL was provided.`,
message: `Internal error: A minimum version is specified for feature ${featureFlag}, but no instance of CodeQL was provided.`,
});
});
});