public static Task StartFunctionsAsync(FeatureContext featureContext)
        {
            FunctionsController   functionsController   = FunctionsBindings.GetFunctionsController(featureContext);
            FunctionConfiguration functionConfiguration = FunctionsBindings.GetFunctionConfiguration(featureContext);

            return(functionsController.StartFunctionsInstance(
                       "Corvus.Testing.AzureFunctions.DemoFunction",
                       7075,
                       "netcoreapp3.1",
                       configuration: functionConfiguration));
        }
Exemple #2
0
        public static Task StartManagementApi(FeatureContext featureContext)
        {
            FunctionsController   functionsController   = FunctionsBindings.GetFunctionsController(featureContext);
            FunctionConfiguration functionConfiguration = FunctionsBindings.GetFunctionConfiguration(featureContext);

            functionConfiguration.EnvironmentVariables.Add("UserNotificationsManagementClient:BaseUri", ManagementApiBaseUri.ToString());
            functionConfiguration.EnvironmentVariables.Add("UserNotificationsApiDeliveryChannelClient:BaseUri", ApiDeliveryChannelBaseUri.ToString());

            return(Task.WhenAll(
                       functionsController.StartFunctionsInstance(
                           "Marain.UserNotifications.Management.Host",
                           ManagementApiPort,
                           "netcoreapp3.1",
                           configuration: functionConfiguration),
                       functionsController.StartFunctionsInstance(
                           "Marain.UserNotifications.ApiDeliveryChannel.Host",
                           ApiDeliveryChannelPort,
                           "netcoreapp3.1",
                           configuration: functionConfiguration)));
        }
Exemple #3
0
        public static Task StartFunctionsAsync(FeatureContext featureContext)
        {
            var functionsController = new FunctionsController();

            featureContext.Set(functionsController);

            return(functionsController.StartFunctionsInstance(
                       featureContext,
                       null,
                       "Corvus.SpecFlow.Extensions.DemoFunction",
                       7075,
                       "netcoreapp3.1"));
        }
        public Task StartFunctionsAsync(FeatureContext featureContext, ScenarioContext scenarioContext)
        {
            var functionsController = new FunctionsController();

            scenarioContext.Set(functionsController);

            return(functionsController.StartFunctionsInstance(
                       featureContext,
                       scenarioContext,
                       "DemoFunction",
                       7075,
                       "netcoreapp3.0"));
        }
Exemple #5
0
        public static async Task StartApis(FeatureContext featureContext)
        {
            FunctionsController   functionsController   = FunctionsBindings.GetFunctionsController(featureContext);
            FunctionConfiguration functionConfiguration = FunctionsBindings.GetFunctionConfiguration(featureContext);

            IConfiguration configuration = ContainerBindings.GetServiceProvider(featureContext).GetRequiredService <IConfiguration>();

            functionConfiguration.CopyToEnvironmentVariables(configuration.AsEnumerable());
            functionConfiguration.EnvironmentVariables.Add("ExternalServices:OperationsStatus", StatusApiBaseUrl);

            await Task.WhenAll(
                functionsController.StartFunctionsInstance(
                    "Marain.Operations.ControlHost.Functions",
                    ControlApiPort,
                    "net6.0",
                    configuration: functionConfiguration),
                functionsController.StartFunctionsInstance(
                    "Marain.Operations.StatusHost.Functions",
                    StatusApiPort,
                    "net6.0",
                    configuration: functionConfiguration));
        }