Browse files

Fixing tests

  • Loading branch information...
1 parent 70933e0 commit 86d80a5bfa626d7d9c29410e3de4aedf2990ea4f @ayende ayende committed Sep 28, 2012
View
12 Bundles/Raven.Bundles.Tests/Raven.Bundles.Tests.csproj
@@ -63,14 +63,6 @@
<Compile Include="..\Raven.Bundles.UniqueConstraints\Util.cs">
<Link>UniqueConstraints\Util.cs</Link>
</Compile>
- <Compile Include="Authentication\AuthorizationTest.cs" />
- <Compile Include="Authentication\AsyncSimpleLogin.cs" />
- <Compile Include="Authentication\Bugs\Mojo2.cs" />
- <Compile Include="Authentication\Bugs\Mojo2_Failed.cs" />
- <Compile Include="Authentication\HttpWebRequestExtensions.cs" />
- <Compile Include="Authentication\SimpleLogin.cs" />
- <Compile Include="Authentication\SmugglerOAuth.cs" />
- <Compile Include="Authentication\UsingDatabaseCommands.cs" />
<Compile Include="Authorization\AuthorizationTest.cs" />
<Compile Include="Authorization\Bugs\fampinheiro.cs" />
<Compile Include="Authorization\Bugs\Jalchr.cs" />
@@ -129,10 +121,6 @@
<Project>{267AC60C-751E-42E9-AA18-66035DEFF63A}</Project>
<Name>Raven.Tests</Name>
</ProjectReference>
- <ProjectReference Include="..\Raven.Bundles.Authentication\Raven.Bundles.Authentication.csproj">
- <Project>{53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}</Project>
- <Name>Raven.Bundles.Authentication</Name>
- </ProjectReference>
<ProjectReference Include="..\Raven.Bundles.Authorization\Raven.Bundles.Authorization.csproj">
<Project>{034FFD8F-F917-4A45-B920-9C460CD66BAF}</Project>
<Name>Raven.Bundles.Authorization</Name>
View
24 Bundles/Raven.Bundles.Tests/Replication/ReplicationWithOAuth.cs
@@ -4,7 +4,6 @@
using System.Net;
using System.Threading;
using Raven.Abstractions.Data;
-using Raven.Bundles.Authentication;
using Raven.Json.Linq;
using Xunit;
@@ -15,21 +14,18 @@ public class ReplicationWithOAuth : ReplicationBase
protected override void ConfigureServer(database::Raven.Database.Config.RavenConfiguration serverConfiguration)
{
serverConfiguration.AnonymousUserAccessMode = database::Raven.Database.Server.AnonymousUserAccessMode.None;
-
- serverConfiguration.Catalog.Catalogs.Add(new AssemblyCatalog(typeof(AuthenticationUser).Assembly));
}
protected override void ConfigureStore(Client.Document.DocumentStore documentStore)
{
- documentStore.Credentials = new NetworkCredential("Ayende", "abc");
+ documentStore.ApiKey = "Ayende/abc";
base.ConfigureStore(documentStore);
}
protected override void SetupDestination(Abstractions.Replication.ReplicationDestination replicationDestination)
{
- replicationDestination.Username = "Ayende";
- replicationDestination.Password = "abc";
+ replicationDestination.ApiKey = "Ayende/abc";
}
[Fact]
@@ -40,15 +36,13 @@ public void CanReplicateDocumentWithOAuth()
foreach (var server in servers)
{
- var writer = new StringWriter();
- store1.Conventions.CreateSerializer().Serialize(writer, new AuthenticationUser
- {
- Name = "Ayende",
- Id = "Raven/Users/Ayende",
- AllowedDatabases = new[] {"*"}
- }.SetPassword("abc"));
-
- server.Database.Put("Raven/Users/Ayende", null, RavenJObject.Parse(writer.GetStringBuilder().ToString()), new RavenJObject(), null);
+ server.Database.Put("Raven/ApiKeys/Ayende", null, RavenJObject.FromObject(new ApiKeyDefinition
+ {
+ Databases = new DatabaseAccess[]{new DatabaseAccess{TenantId = "*"}, },
+ Enabled = true,
+ Name = "Ayende",
+ Secret = "abc"
+ }), new RavenJObject(), null);
}
TellFirstInstanceToReplicateToSecondInstance();
View
14 Raven.Bundles.sln
@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2010
+# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.Tests", "Bundles\Raven.Bundles.Tests\Raven.Bundles.Tests.csproj", "{35CFAB1C-7934-4481-AC0D-7102F7DEE7F8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Server", "Raven.Server\Raven.Server.csproj", "{3B90EB20-AEA3-4972-8219-936F1A62768C}"
@@ -24,8 +24,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.CascadeDelete
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Client.Embedded", "Raven.Client.Embedded\Raven.Client.Embedded.csproj", "{0F5287AD-37B3-4375-BA3E-3CED64B1FC5B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.Authentication", "Bundles\Raven.Bundles.Authentication\Raven.Bundles.Authentication.csproj", "{53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Smuggler", "Raven.Smuggler\Raven.Smuggler.csproj", "{3E6401AC-3E33-4B61-A460-49953654A207}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.UniqueConstraints", "Bundles\Raven.Bundles.UniqueConstraints\Raven.Bundles.UniqueConstraints.csproj", "{4C026F8A-FB36-4A30-82E9-324D207F6B48}"
@@ -153,16 +151,6 @@ Global
{0F5287AD-37B3-4375-BA3E-3CED64B1FC5B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0F5287AD-37B3-4375-BA3E-3CED64B1FC5B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0F5287AD-37B3-4375-BA3E-3CED64B1FC5B}.Release|x86.ActiveCfg = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|Any CPU.Build.0 = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|x86.ActiveCfg = Release|Any CPU
{3E6401AC-3E33-4B61-A460-49953654A207}.Debug|Any CPU.ActiveCfg = Debug|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{3E6401AC-3E33-4B61-A460-49953654A207}.Debug|Mixed Platforms.Build.0 = Debug|x86
View
37 zzz_RavenDB_Release.sln
@@ -1,5 +1,13 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{3617B75B-4CD6-4420-86B9-CACDC3C00D47}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bundles", "Bundles", "{F2B14D1C-4B20-4DA0-9CE6-C169773B0493}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{135E8994-55C0-4353-B31A-24778CB727B5}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AutoGenerated", "AutoGenerated", "{27B98D65-6F39-48A7-B23D-B8FC73D730B8}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Server", "Raven.Server\Raven.Server.csproj", "{3B90EB20-AEA3-4972-8219-936F1A62768C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Tests", "Raven.Tests\Raven.Tests.csproj", "{267AC60C-751E-42E9-AA18-66035DEFF63A}"
@@ -36,16 +44,10 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Raven.Tests.FSharp", "Raven
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Client.Silverlight.g.4", "Raven.Client.Silverlight\Raven.Client.Silverlight.g.4.csproj", "{E5D4EE45-489D-481F-A2B0-E638763BB30A}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{3617B75B-4CD6-4420-86B9-CACDC3C00D47}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Performance", "Raven.Performance\Raven.Performance.csproj", "{0856CF09-1334-4D8B-BB79-8011D0E66E84}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.StressTests", "Raven.StressTests\Raven.StressTests.csproj", "{005A5143-4E38-424B-A2D1-25EF88DA05CB}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bundles", "Bundles", "{F2B14D1C-4B20-4DA0-9CE6-C169773B0493}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{135E8994-55C0-4353-B31A-24778CB727B5}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.Sample.EventSourcing.ShoppingCartAggregator", "Samples\Raven.Bundles.Sample.EventSourcing.ShoppingCartAggregator\Raven.Bundles.Sample.EventSourcing.ShoppingCartAggregator.csproj", "{B09A78D9-B609-459F-9AE1-319799330C6B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Sample.EventSourcing", "Samples\Raven.Sample.EventSourcing\Raven.Sample.EventSourcing.csproj", "{C9D466E0-346D-4C68-8F2F-1391C498E07F}"
@@ -74,8 +76,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Samples.IndexReplicat
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Sample.Suggestions", "Samples\Raven.Sample.Suggestions\Raven.Sample.Suggestions.csproj", "{CF9AEB02-E984-4ECD-A1C7-08950DF717B4}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.Authentication", "Bundles\Raven.Bundles.Authentication\Raven.Bundles.Authentication.csproj", "{53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.Authorization", "Bundles\Raven.Bundles.Authorization\Raven.Bundles.Authorization.csproj", "{034FFD8F-F917-4A45-B920-9C460CD66BAF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.CascadeDelete", "Bundles\Raven.Bundles.CascadeDelete\Raven.Bundles.CascadeDelete.csproj", "{D9CCC62F-0B4E-4B37-BE7E-203D34B4EC4F}"
@@ -96,8 +96,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Bundles.Tests", "Bund
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Raven.Database", "Raven.Database\Raven.Database.csproj", "{212823CD-25E1-41AC-92D1-D6DF4D53FC85}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AutoGenerated", "AutoGenerated", "{27B98D65-6F39-48A7-B23D-B8FC73D730B8}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -448,16 +446,6 @@ Global
{CF9AEB02-E984-4ECD-A1C7-08950DF717B4}.Release|Mixed Platforms.Build.0 = Release|x86
{CF9AEB02-E984-4ECD-A1C7-08950DF717B4}.Release|x86.ActiveCfg = Release|x86
{CF9AEB02-E984-4ECD-A1C7-08950DF717B4}.Release|x86.Build.0 = Release|x86
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|Any CPU.Build.0 = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A}.Release|x86.ActiveCfg = Release|Any CPU
{034FFD8F-F917-4A45-B920-9C460CD66BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{034FFD8F-F917-4A45-B920-9C460CD66BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{034FFD8F-F917-4A45-B920-9C460CD66BAF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -563,14 +551,12 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
+ {267AC60C-751E-42E9-AA18-66035DEFF63A} = {3617B75B-4CD6-4420-86B9-CACDC3C00D47}
{F4D4FDE0-BE9B-4139-A76C-7848A641324A} = {3617B75B-4CD6-4420-86B9-CACDC3C00D47}
{129E5462-F398-499C-B69B-FC07666C6A31} = {3617B75B-4CD6-4420-86B9-CACDC3C00D47}
{295D9C7D-5F05-4B12-BB1E-8FB7A21E9071} = {3617B75B-4CD6-4420-86B9-CACDC3C00D47}
- {267AC60C-751E-42E9-AA18-66035DEFF63A} = {3617B75B-4CD6-4420-86B9-CACDC3C00D47}
{0856CF09-1334-4D8B-BB79-8011D0E66E84} = {3617B75B-4CD6-4420-86B9-CACDC3C00D47}
{005A5143-4E38-424B-A2D1-25EF88DA05CB} = {3617B75B-4CD6-4420-86B9-CACDC3C00D47}
- {E5D4EE45-489D-481F-A2B0-E638763BB30A} = {27B98D65-6F39-48A7-B23D-B8FC73D730B8}
- {53DA3AE4-1648-43B9-A814-BAFD89AEBF2A} = {F2B14D1C-4B20-4DA0-9CE6-C169773B0493}
{034FFD8F-F917-4A45-B920-9C460CD66BAF} = {F2B14D1C-4B20-4DA0-9CE6-C169773B0493}
{D9CCC62F-0B4E-4B37-BE7E-203D34B4EC4F} = {F2B14D1C-4B20-4DA0-9CE6-C169773B0493}
{5E2C2AAA-31E4-4F2B-A3E3-E1332D2D338A} = {F2B14D1C-4B20-4DA0-9CE6-C169773B0493}
@@ -594,5 +580,6 @@ Global
{3B0A8E42-9555-41FA-A49C-F262BA858F29} = {135E8994-55C0-4353-B31A-24778CB727B5}
{9528D4C6-E15A-46DC-BEBA-AAE2121BA724} = {135E8994-55C0-4353-B31A-24778CB727B5}
{CF9AEB02-E984-4ECD-A1C7-08950DF717B4} = {135E8994-55C0-4353-B31A-24778CB727B5}
+ {E5D4EE45-489D-481F-A2B0-E638763BB30A} = {27B98D65-6F39-48A7-B23D-B8FC73D730B8}
EndGlobalSection
EndGlobal

0 comments on commit 86d80a5

Please sign in to comment.