mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 04:18:07 +00:00
Adds implementation of the `info` function. Added support for blobs in the function integration test stuff. Simplified usage of integration test classes by removing the account name parameter.
57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
using System;
|
||
using System.Threading.Tasks;
|
||
using Azure.Core;
|
||
using Azure.Identity;
|
||
using Azure.ResourceManager;
|
||
using Azure.ResourceManager.Resources;
|
||
using Microsoft.OneFuzz.Service;
|
||
using Task = System.Threading.Tasks.Task;
|
||
|
||
namespace Tests.Fakes;
|
||
|
||
class TestCreds : ICreds {
|
||
|
||
private readonly Guid _subscriptionId;
|
||
private readonly string _resourceGroup;
|
||
private readonly string _region;
|
||
|
||
public TestCreds(Guid subscriptionId, string resourceGroup, string region) {
|
||
_subscriptionId = subscriptionId;
|
||
_resourceGroup = resourceGroup;
|
||
_region = region;
|
||
}
|
||
|
||
public ArmClient ArmClient => null!;
|
||
// we have to return something in some test cases, even if it isn’t used
|
||
|
||
public Task<string> GetBaseRegion() => Task.FromResult(_region);
|
||
|
||
public string GetBaseResourceGroup() => _resourceGroup;
|
||
|
||
public string GetSubscription() => _subscriptionId.ToString();
|
||
|
||
public DefaultAzureCredential GetIdentity() {
|
||
throw new NotImplementedException();
|
||
}
|
||
|
||
public string GetInstanceName() {
|
||
throw new NotImplementedException();
|
||
}
|
||
|
||
public Uri GetInstanceUrl() {
|
||
throw new NotImplementedException();
|
||
}
|
||
|
||
public ResourceGroupResource GetResourceGroupResource() {
|
||
throw new NotImplementedException();
|
||
}
|
||
|
||
public ResourceIdentifier GetResourceGroupResourceIdentifier() {
|
||
throw new NotImplementedException();
|
||
}
|
||
|
||
public Guid GetScalesetPrincipalId() {
|
||
throw new NotImplementedException();
|
||
}
|
||
}
|