Incorrect AzureTable name when using a custom AzureTable name
Closed this issue · 1 comments
Describe the bug
When using a custom Azure Table name, the table is created on startup but when connecting to the table in the TableSearchService
the wrong table name is used.
To Reproduce
Steps to reproduce the behaviour:
- Using the latest version of BaGetter.
- Run the project with AzureTable setup.
- When setting the table name property use any value other than "Packages".
- An error occurs immediately on startup.
Expected behaviour
This error should not be thrown and the correct table should be connected to and checked for values.
Screenshots
N/a
Additional context
Registering the TableServiceClient
correctly creates the table with the right name, as shown below (line 30):
BaGetter/src/BaGetter.Azure/AzureApplicationExtensions.cs
Lines 25 to 32 in 7c9f535
When using the TableServiceClient
in the TableSearchService
class, a TableClient
is created but the table name used is a const string set to "Packages". See line 15 being used at line 27:
BaGetter/src/BaGetter.Azure/Table/TableSearchService.cs
Lines 15 to 29 in 7c9f535
Therefore when any name other than "Packages" is specified the TableSearchService
fails with a 404 Not Found from Azure.
This is fixed with version 1.4.3.