Migrate timer_task part 3 (#2066)

* Adding unit tests for the scheduler

* formatting

* fix unit test

* bug fixes

* proting a couple more missong functions

* more bug fixes

* fixing queries and serilization

* fix sas url generation

* fix condition

* [testing] enabling timer_tasks for testing

* Update src/ApiService/Tests/SchedulerTests.cs

Co-authored-by: George Pollard <porges@porg.es>

* address PR comments

* build fix

* address PR comment

* removing renamed function

* resolve merge

* Update src/ApiService/Tests/Integration/AzuriteStorage.cs

Co-authored-by: George Pollard <porges@porg.es>

* - Added verification of the state transition functions
- disabled validation on PoolName

* Update src/deployment/deploy.py

Co-authored-by: George Pollard <porges@porg.es>
Co-authored-by: George Pollard <gpollard@microsoft.com>
This commit is contained in:
Cheick Keita
2022-06-24 09:22:08 -07:00
committed by GitHub
parent fb9af4b811
commit d61fe48a55
23 changed files with 427 additions and 136 deletions

View File

@ -25,21 +25,31 @@ sealed class AzureStorage : IStorage {
return new AzureStorage(accountName, accountKey);
}
public string? AccountName { get; }
public string? AccountKey { get; }
public string AccountName { get; }
public string AccountKey { get; }
public AzureStorage(string? accountName, string? accountKey) {
public AzureStorage(string accountName, string accountKey) {
AccountName = accountName;
AccountKey = accountKey;
}
public Task<(string?, string?)> GetStorageAccountNameAndKey(string accountId)
=> Async.Task.FromResult((AccountName, AccountKey));
public IEnumerable<string> CorpusAccounts() {
throw new System.NotImplementedException();
}
public IEnumerable<string> GetAccounts(StorageType storageType) {
if (AccountName != null) {
yield return AccountName;
}
yield return AccountName;
}
public string GetPrimaryAccount(StorageType storageType) {
throw new System.NotImplementedException();
}
public Task<(string, string)> GetStorageAccountNameAndKey(string accountId)
=> Async.Task.FromResult((AccountName, AccountKey));
public Task<string?> GetStorageAccountNameKeyByName(string accountName) {
return Async.Task.FromResult(AccountName)!;
}
public Uri GetTableEndpoint(string accountId)
@ -51,15 +61,4 @@ sealed class AzureStorage : IStorage {
public Uri GetBlobEndpoint(string accountId)
=> new($"https://{AccountName}.blob.core.windows.net/");
public IEnumerable<string> CorpusAccounts() {
throw new System.NotImplementedException();
}
public string GetPrimaryAccount(StorageType storageType) {
throw new System.NotImplementedException();
}
public Task<string?> GetStorageAccountNameAndKeyByName(string accountName) {
throw new System.NotImplementedException();
}
}