Skip to content

Commit 47052e6

Browse files
authored
Remove storage account check as we only use it when running locally now (#198)
1 parent 7531142 commit 47052e6

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Altinn.Broker/Controllers/HealthController.cs

+1-12
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,11 @@ public class HealthController : ControllerBase
1717
{
1818
private readonly DatabaseConnectionProvider _databaseConnectionProvider;
1919
private readonly AzureResourceManagerOptions _azureResourceManagerOptions;
20-
private readonly AzureStorageOptions _azureStorageOptions;
21-
private readonly IFileStore _fileStore;
2220

23-
public HealthController(DatabaseConnectionProvider databaseConnectionProvider, IOptions<AzureResourceManagerOptions> azureResourceManagerOptions, IOptions<AzureStorageOptions> azureStorageOptions, IFileStore fileStore)
21+
public HealthController(DatabaseConnectionProvider databaseConnectionProvider, IOptions<AzureResourceManagerOptions> azureResourceManagerOptions)
2422
{
2523
_databaseConnectionProvider = databaseConnectionProvider;
2624
_azureResourceManagerOptions = azureResourceManagerOptions.Value;
27-
_azureStorageOptions = azureStorageOptions.Value;
28-
_fileStore = fileStore;
2925
}
3026

3127
[HttpGet]
@@ -48,13 +44,6 @@ public async Task<ActionResult> HealthCheckAsync()
4844
return BadRequest("Exception thrown while trying to query database");
4945
}
5046

51-
var storageAccountOnline = await _fileStore.IsOnline(_azureStorageOptions.ConnectionString);
52-
if (!storageAccountOnline)
53-
{
54-
Console.Error.WriteLine("Health: Invalid storage account in StorageOptions!");
55-
return BadRequest("Invalid storage account in StorageOptions");
56-
}
57-
5847
// Verify that resource manager has access to our subscription
5948
var credentials = new ClientSecretCredential(_azureResourceManagerOptions.TenantId, _azureResourceManagerOptions.ClientId, _azureResourceManagerOptions.ClientSecret);
6049
var armClient = new ArmClient(credentials);

0 commit comments

Comments
 (0)