Move configuration of redirect authentication flow to a global parameter named "enableExperimentalRedirectFlow". Pass the configApi instance into authentication providers to read new configuration parameter.
Signed-off-by: headphonejames <generalfuzz@gmail.com>
This commit is contained in:
@@ -18,6 +18,8 @@ import { renderInTestApp, TestApiRegistry } from '@backstage/test-utils';
|
||||
import React from 'react';
|
||||
import { gitOpsApiRef, GitOpsRestApi } from '../../api';
|
||||
import ProfileCatalog from './ProfileCatalog';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { ConfigApi } from '@backstage/core-plugin-api';
|
||||
|
||||
import {
|
||||
ApiProvider,
|
||||
@@ -31,6 +33,9 @@ import { githubAuthApiRef } from '@backstage/core-plugin-api';
|
||||
describe('ProfileCatalog', () => {
|
||||
it('should render', async () => {
|
||||
const oauthRequestApi = new OAuthRequestManager();
|
||||
const configApi: ConfigApi = new ConfigReader({
|
||||
enableExperimentalRedirectFlow: false,
|
||||
});
|
||||
const apis = TestApiRegistry.from(
|
||||
[gitOpsApiRef, new GitOpsRestApi('http://localhost:3008')],
|
||||
[
|
||||
@@ -40,6 +45,7 @@ describe('ProfileCatalog', () => {
|
||||
'http://example.com/{{pluginId}}',
|
||||
),
|
||||
oauthRequestApi,
|
||||
configApi: configApi,
|
||||
}),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user