Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Munn <greg@sgmunn.com>2016-08-11 23:04:36 +0300
committerGitHub <noreply@github.com>2016-08-11 23:04:36 +0300
commit860f5d2e358077f913badaf7b14c5532888bf12c (patch)
tree8aba119dbc5024c9b0e256b5b83b39e3f257b774
parent3f17fd83b86e5bdf1499060daaddcc139f6f758b (diff)
parentd37c762c7435f19f989f4d5b87d308fe2dd686bc (diff)
Merge pull request #1598 from mono/cycle8-fix-keychainmonodevelop-6.1.0.5338
[Mac] Try using a temporary keychain for the credentials tests.
-rw-r--r--main/tests/MacPlatform.Tests/CredentialsProviderTests.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/tests/MacPlatform.Tests/CredentialsProviderTests.cs b/main/tests/MacPlatform.Tests/CredentialsProviderTests.cs
index 698651e0f2..94c183927a 100644
--- a/main/tests/MacPlatform.Tests/CredentialsProviderTests.cs
+++ b/main/tests/MacPlatform.Tests/CredentialsProviderTests.cs
@@ -24,6 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
+using MonoDevelop.MacInterop;
using NUnit.Framework;
namespace MacPlatform.Tests
@@ -31,6 +32,22 @@ namespace MacPlatform.Tests
[TestFixture]
public class CredentialsProviderTests : MonoDevelop.Core.BaseCredentialsProviderTests
{
+ static string TestKeyChain = "ThisIsMonoDevelopsPrivateKeyChainForTests";
+
+ [TestFixtureSetUp]
+ public void FixtureSetup ()
+ {
+ Keychain.TryDeleteKeychain (TestKeyChain);
+ Keychain.CurrentKeychain = Keychain.CreateKeychain (TestKeyChain, "mypassword");
+ }
+
+ [TestFixtureTearDown]
+ public void FixtureTeardown ()
+ {
+ Keychain.DeleteKeychain (Keychain.CurrentKeychain);
+ Keychain.CurrentKeychain = IntPtr.Zero;
+ }
+
protected override MonoDevelop.Core.IPasswordProvider GetPasswordProvider ()
{
return new MonoDevelop.MacIntegration.MacKeychainPasswordProvider ();