• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HicServices / RDMP / 10453848102

19 Aug 2024 12:59PM UTC coverage: 57.407% (+0.2%) from 57.247%
10453848102

push

github

web-flow
Merge pull request #1924 from HicServices/task/RDMP-168-aws-integration

Task/rdmp 168 aws integration

11187 of 20990 branches covered (53.3%)

Branch coverage included in aggregate %.

200 of 314 new or added lines in 8 files covered. (63.69%)

31658 of 53644 relevant lines covered (59.01%)

8228.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/Rdmp.Core/ReusableLibraryCode/AWS/AWSCredentialsHelper.cs
1
// Copyright (c) The University of Dundee 2024-2024
2
// This file is part of the Research Data Management Platform (RDMP).
3
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.
6

7
using Amazon.Runtime;
8
using Amazon.Runtime.CredentialManagement;
9
using System;
10

11
namespace Rdmp.Core.ReusableLibraryCode.AWS
12
{
13
    public static class AWSCredentialsHelper
14
    {
15
        public static AWSCredentials LoadSsoCredentials(string profile)
16
        {
17
            var chain = new CredentialProfileStoreChain();
12✔
18
            if (!chain.TryGetAWSCredentials(profile, out var credentials))
12!
NEW
19
                throw new Exception($"Failed to find the {profile} profile");
×
20
            return credentials;
12✔
21
        }
22
    }
23
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc