mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-15 03:18:07 +00:00
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:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user