Commits (4)
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<ProjectReference Include="..\ResourceTypeWaterbutlerRdsS3\ResourceTypeWaterbutlerRdsS3.csproj" /> <ProjectReference Include="..\ResourceTypeWaterbutlerRdsS3\ResourceTypeWaterbutlerRdsS3.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Coscine.ResourceLoader" Version="2.*-*" /> <PackageReference Include="Coscine.ResourceLoader" Version="2.*-*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="NUnit" Version="3.13.1" /> <PackageReference Include="NUnit" Version="3.13.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" /> <PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
......
...@@ -14,8 +14,8 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test ...@@ -14,8 +14,8 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test
public class ResourceTypeWaterbutlerRdsS3Tests public class ResourceTypeWaterbutlerRdsS3Tests
{ {
private readonly string _testPrefix = "Coscine-ResourceTypeWaterbutlerS3Tests-Tests"; private readonly string _testPrefix = "Coscine-ResourceTypeWaterbutlerS3Tests-Tests";
private readonly string _rdsS3KeyPrefix = "coscine/global/rds/ecs-rwth/rds-s3"; private string _rdsS3KeyPrefix;
private readonly string _userKeyPrefix = "coscine/global/rds/ecs-rwth/users"; private string _userKeyPrefix;
private readonly ResourceTypeConfigurationObject _resourceTypeConfiguration = new ResourceTypeConfigurationObject(); private readonly ResourceTypeConfigurationObject _resourceTypeConfiguration = new ResourceTypeConfigurationObject();
private readonly IConfiguration _configuration = new ConsulConfiguration(); private readonly IConfiguration _configuration = new ConsulConfiguration();
...@@ -43,11 +43,17 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test ...@@ -43,11 +43,17 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3.Test
{ {
_resourceTypeConfiguration.Config = new Dictionary<string, string> _resourceTypeConfiguration.Config = new Dictionary<string, string>
{ {
{ "rdss3Key", "coscine/global/rds/ecs-rwth/rds-s3" },
{ "userKey", "coscine/global/rds/ecs-rwth/users"}
}; };
_resourceType = "rdss3"; _resourceType = "rdss3";
_localAssemblyName = "Coscine.ResourceTypeWaterbutlerRdsS3"; _localAssemblyName = "Coscine.ResourceTypeWaterbutlerRdsS3";
_rdsS3KeyPrefix = _resourceTypeConfiguration.Config["rdss3Key"];
_userKeyPrefix = _resourceTypeConfiguration.Config["userKey"];
_quota = 1; _quota = 1;
_guid = Guid.NewGuid(); _guid = Guid.NewGuid();
_bucketName = $"{_testPrefix}.{_guid}"; _bucketName = $"{_testPrefix}.{_guid}";
......
...@@ -17,8 +17,8 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3 ...@@ -17,8 +17,8 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3
{ {
public class ResourceTypeWaterbutlerRdsS3 : ResourceTypeDefinition public class ResourceTypeWaterbutlerRdsS3 : ResourceTypeDefinition
{ {
private readonly string _rdsS3KeyPrefix = "coscine/global/rds/ecs-rwth/rds-s3"; private readonly string _rdsS3KeyPrefix;
private readonly string _userKeyPrefix = "coscine/global/rds/ecs-rwth/users"; private readonly string _userKeyPrefix;
private readonly WaterbutlerInterface _waterbutlerInterface; private readonly WaterbutlerInterface _waterbutlerInterface;
...@@ -36,6 +36,8 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3 ...@@ -36,6 +36,8 @@ namespace Coscine.ResourceTypeWaterbutlerRdsS3
public ResourceTypeWaterbutlerRdsS3(string name, IConfiguration gConfig, ResourceTypeConfigurationObject resourceTypeConfiguration) : base(name, gConfig, resourceTypeConfiguration) public ResourceTypeWaterbutlerRdsS3(string name, IConfiguration gConfig, ResourceTypeConfigurationObject resourceTypeConfiguration) : base(name, gConfig, resourceTypeConfiguration)
{ {
_waterbutlerInterface = new WaterbutlerInterface(Configuration, new DataSourceService(new HttpClient())); _waterbutlerInterface = new WaterbutlerInterface(Configuration, new DataSourceService(new HttpClient()));
_rdsS3KeyPrefix = resourceTypeConfiguration.Config["rdss3Key"];
_userKeyPrefix = resourceTypeConfiguration.Config["userKey"];
_rdsS3EcsManager = new EcsManager _rdsS3EcsManager = new EcsManager
{ {
EcsManagerConfiguration = new EcsManagerConfiguration EcsManagerConfiguration = new EcsManagerConfiguration
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<RootNamespace>Coscine.ResourceTypeWaterbutlerRdsS3</RootNamespace> <RootNamespace>Coscine.ResourceTypeWaterbutlerRdsS3</RootNamespace>
<AssemblyName>Coscine.ResourceTypeWaterbutlerRdsS3</AssemblyName> <AssemblyName>Coscine.ResourceTypeWaterbutlerRdsS3</AssemblyName>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<Version>1.4.2</Version> <Version>1.5.0</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Authors>RWTH Aachen University</Authors> <Authors>RWTH Aachen University</Authors>
......