Skip to content

Add environment configuration to FiksIOSettings #1493

Description

@danielskovli

Description

The Fiks IO client currently uses IHostEnvironment to decide which Fiks host to use:

private EnvironmentConfiguration GetConfiguration(AppIdentifier appIdentifier)
{
var ampqAppName = $"altinn-app-{appIdentifier.Org}-{appIdentifier.App}";
return _env.IsProduction()
? new EnvironmentConfiguration(
ApiConfiguration.CreateProdConfiguration(),
AmqpConfiguration.ProdHost,
ampqAppName
)
: new EnvironmentConfiguration(
ApiConfiguration.CreateTestConfiguration(),
AmqpConfiguration.TestHost,
ampqAppName
);
}

However, this is pretty invisible to the user, and potentially a bit inflexible.

Suggestion

Either expose an environment switch (test/prod) or expose the AMQP and API host values directly. Currently automagically provided by AmqpConfiguration.ProdHost and ApiConfiguration.CreateProdConfiguration() (and their test equivalents).

Metadata

Metadata

Assignees

Labels

good-first-issueIssues that are easy to fix for new team members or external contributorssquad/dataIssues that belongs to the named squad.squad/flytIssues that belongs to the named squad.status/triage

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
No status
Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions