From 995857efc0656301e64010155f7ebd7d3baa7e67 Mon Sep 17 00:00:00 2001 From: jehine-MSFT Date: Wed, 16 Mar 2016 10:12:51 -0700 Subject: [PATCH] Add CONTRIBUTING.md file and change test config set up --- .gitignore | 3 ++ BreakingChanges.txt | 1 + CONTRIBUTING.md | 52 +++++++++++++++++++ Microsoft.WindowsAzure.Storage.sln | 6 ++- README.md | 2 +- Test/ClassLibraryCommon/TestBase.cs | 13 +++-- ...ons.xml => TestConfigurationsTemplate.xml} | 0 ...Microsoft.WindowsAzure.Storage.Test.csproj | 7 ++- ...Microsoft.WindowsAzure.Storage.Test.csproj | 5 ++ ...ft.WindowsAzure.StoragePhone81.Test.csproj | 5 ++ ...t.WindowsAzure.Storage.PhoneRT.Test.csproj | 5 ++ ...crosoft.WindowsAzure.StorageRT.Test.csproj | 13 +++-- Test/WindowsRuntime/TestBase.cs | 17 ++++-- changelog.txt | 4 ++ 14 files changed, 118 insertions(+), 15 deletions(-) create mode 100644 CONTRIBUTING.md rename Test/Common/{TestConfigurations.xml => TestConfigurationsTemplate.xml} (100%) diff --git a/.gitignore b/.gitignore index d5ea2c5a4..a1614a183 100644 --- a/.gitignore +++ b/.gitignore @@ -112,6 +112,9 @@ UpgradeLog*.XML AppPackages/ Packages/ +# Test Config +Test/Common/TestConfigurations.xml + # Test Results TestResults/ diff --git a/BreakingChanges.txt b/BreakingChanges.txt index 975b3d5d6..2bb731861 100644 --- a/BreakingChanges.txt +++ b/BreakingChanges.txt @@ -1,5 +1,6 @@ Tracking Breaking Changes since 6.0 +- All: TestConfigurations.xml has been deleted and added to the .gitignore file to keep users from accidentally leaking their credentials. To continue running tests, simply add the same file back after you get the latest code. - All: The dnx and net target frameworks have been unified, and DNXCore target framework has been renamed to Dotnet5.4. All DNX4.5.1 projects will take a dependency on the regular Windows Desktop dll. Tracking Breaking Changes since 5.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..2f47fde3d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,52 @@ +If you intend to contribute to the project, please make sure you've followed the instructions provided in the [Azure Projects Contribution Guidelines](http://azure.github.io/guidelines/). +## Project Setup +The Azure Storage development team uses Visual Studio so instructions will be tailored to that preference. However, any preferred IDE or other toolset should be usable. + +### Install +* .Net 4.5.1 +* Visual Studio 2013. If you want to work with the CoreCLR SDK, you will need Visual Studio 2015. Note not all of the non-CoreCLR SDKs work in VS 2015, so you may need to develop with both 2013 and 2015 if you take a dependency on multiple runtimes. +* [StyleCop](http://stylecop.codeplex.com/) checks your code’s style – spacing, comments, etc. You can run this from the Tools menu in Visual Studio or by right clicking the project/folder you’d like to run it on. +* Clone the source code from GitHub. + +### Open Solution +For non-CoreCLR solutions, you can open the project from VS using File->Open->Project/Solution and navigating to the Microsoft.WindowsAzure.Storage.sln solution file in the repo base folder. +For the CoreCLR solution, you can open the project using the AspNet_k.sln solution in the repo base folder. + +## Tests + +### Configuration +The only step to configure testing is to add a TestConfiguration.xml to the Test/Common/ folder. You should insert your storage account information into the file using [this](Test/Common/TestConfigurationsTemplate.xml) as a template. + +### Running +To actually run tests, right click the individual test or test class in the Test Explorer panel. +*Note*: Running all tests will take many hours, so you should run a subset of tests that validate your change. + +### Testing Features +As you develop a feature, you'll need to write tests to ensure quality. You should also run existing tests related to your change to address any unexpected breaks. + +## Pull Requests + +### Guidelines +The following are the minimum requirements for any pull request that must be met before contributions can be accepted. +* Make sure you've signed the CLA before you start working on any change. +* Discuss any proposed contribution with the team via a GitHub issue **before** starting development. +* Code must be professional quality + * No style issues, StyleCop doesn't report any *new* issues related to your changes + * You should strive to mimic the style with which we have written the library + * Clean, well-commented, well-designed code + * Try to limit the number of commits for a feature to 1-2. If you end up having too many we may ask you to squash your changes into fewer commits. +* [changelog.txt](changelog.txt) needs to be updated describing the new change +* Thoroughly test your feature + +### Branching Policy +Non-breaking changes should be based on the dev branch whereas breaking changes should be based on the dev_breaking branch. Each breaking change should be recorded in [BreakingChanges.txt](BreakingChanges.txt). +We generally release any breaking changes in the next major version (e.g. 6.0, 7.0) and non-breaking changes in the next minor or major version (e.g. 6.0, 6.1, 6.2). + +### Adding Features for All Platforms +We strive to release each new feature for each of our environments at the same time. Therefore, we ask that all contributions be written for both our Desktop SDK and our Window Runtime/CoreCLR SDK. This includes testing work for both platforms as well. + +### Review Process +We expect all guidelines to be met before accepting a pull request. As such, we will work with you to address issues we find by leaving comments in your code. Please understand that it may take a few iterations before the code is accepted as we maintain high standards on code quality. Once we feel comfortable with a contribution, we will validate the change and accept the pull request. + + +Thank you for any contributions! Please let the team know if you have any questions or concerns about our contribution policy. \ No newline at end of file diff --git a/Microsoft.WindowsAzure.Storage.sln b/Microsoft.WindowsAzure.Storage.sln index 3f16c1be9..db168b640 100644 --- a/Microsoft.WindowsAzure.Storage.sln +++ b/Microsoft.WindowsAzure.Storage.sln @@ -1,10 +1,14 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30501.0 +VisualStudioVersion = 12.0.40629.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{CE1EB2B6-0DA8-43D4-A2E1-001804697009}" ProjectSection(SolutionItems) = preProject + BreakingChanges.txt = BreakingChanges.txt + changelog.txt = changelog.txt + CONTRIBUTING.md = CONTRIBUTING.md + README.md = README.md Lib\WindowsDesktop\WindowsAzure.Storage.nuspec = Lib\WindowsDesktop\WindowsAzure.Storage.nuspec EndProjectSection EndProject diff --git a/README.md b/README.md index 844933e69..b522c27b3 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ We gladly accept community contributions. - Issues: Please report bugs using the Issues section of GitHub - Forums: Interact with the development teams on StackOverflow or the Microsoft Azure Forums -- Source Code Contributions: Please follow the [contribution guidelines for Microsoft Azure open source](http://azure.github.io/guidelines/) that details information on onboarding as a contributor +- Source Code Contributions: Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute code. For general suggestions about Microsoft Azure please use our [UserVoice forum](http://feedback.azure.com/forums/34192--general-feedback). diff --git a/Test/ClassLibraryCommon/TestBase.cs b/Test/ClassLibraryCommon/TestBase.cs index c61122d13..b46126a66 100644 --- a/Test/ClassLibraryCommon/TestBase.cs +++ b/Test/ClassLibraryCommon/TestBase.cs @@ -26,10 +26,17 @@ public partial class TestBase { static TestBase() { - XElement element = XElement.Load(TestConfigurations.DefaultTestConfigFilePath); - TestConfigurations configurations = TestConfigurations.ReadFromXml(element); + try + { + XElement element = XElement.Load(TestConfigurations.DefaultTestConfigFilePath); + TestConfigurations configurations = TestConfigurations.ReadFromXml(element); - TestBase.Initialize(configurations); + TestBase.Initialize(configurations); + } + catch (System.IO.FileNotFoundException) + { + throw new System.IO.FileNotFoundException("To run tests you need to supply a TestConfigurations.xml file with credentials in the Test/Common folder. Use TestConfigurationsTemplate.xml as a template."); + } } } } diff --git a/Test/Common/TestConfigurations.xml b/Test/Common/TestConfigurationsTemplate.xml similarity index 100% rename from Test/Common/TestConfigurations.xml rename to Test/Common/TestConfigurationsTemplate.xml diff --git a/Test/WindowsDesktop/Microsoft.WindowsAzure.Storage.Test.csproj b/Test/WindowsDesktop/Microsoft.WindowsAzure.Storage.Test.csproj index 6c0124841..87f383039 100644 --- a/Test/WindowsDesktop/Microsoft.WindowsAzure.Storage.Test.csproj +++ b/Test/WindowsDesktop/Microsoft.WindowsAzure.Storage.Test.csproj @@ -234,7 +234,12 @@ Readme.txt - + + TestConfigurationsTemplate.xml + + + + TestConfigurations.xml Always Designer diff --git a/Test/WindowsPhone/Microsoft.WindowsAzure.Storage.Test.csproj b/Test/WindowsPhone/Microsoft.WindowsAzure.Storage.Test.csproj index 233f07746..d68c35cd4 100644 --- a/Test/WindowsPhone/Microsoft.WindowsAzure.Storage.Test.csproj +++ b/Test/WindowsPhone/Microsoft.WindowsAzure.Storage.Test.csproj @@ -136,6 +136,11 @@ Readme.txt + + TestConfigurationsTemplate.xml + + + TestConfigurations.xml Always diff --git a/Test/WindowsPhone81/Microsoft.WindowsAzure.StoragePhone81.Test.csproj b/Test/WindowsPhone81/Microsoft.WindowsAzure.StoragePhone81.Test.csproj index ffcfc90ae..1f1c57df7 100644 --- a/Test/WindowsPhone81/Microsoft.WindowsAzure.StoragePhone81.Test.csproj +++ b/Test/WindowsPhone81/Microsoft.WindowsAzure.StoragePhone81.Test.csproj @@ -137,6 +137,11 @@ Readme.txt + + TestConfigurationsTemplate.xml + + + TestConfigurations.xml Always diff --git a/Test/WindowsPhoneRT.Test/Microsoft.WindowsAzure.Storage.PhoneRT.Test.csproj b/Test/WindowsPhoneRT.Test/Microsoft.WindowsAzure.Storage.PhoneRT.Test.csproj index 6f04bff35..9150d2259 100644 --- a/Test/WindowsPhoneRT.Test/Microsoft.WindowsAzure.Storage.PhoneRT.Test.csproj +++ b/Test/WindowsPhoneRT.Test/Microsoft.WindowsAzure.Storage.PhoneRT.Test.csproj @@ -127,6 +127,11 @@ Readme.txt + + TestConfigurationsTemplate.xml + + + TestConfigurations.xml Always diff --git a/Test/WindowsRuntime/Microsoft.WindowsAzure.StorageRT.Test.csproj b/Test/WindowsRuntime/Microsoft.WindowsAzure.StorageRT.Test.csproj index 2cee33df6..a1582262b 100644 --- a/Test/WindowsRuntime/Microsoft.WindowsAzure.StorageRT.Test.csproj +++ b/Test/WindowsRuntime/Microsoft.WindowsAzure.StorageRT.Test.csproj @@ -141,10 +141,8 @@ Readme.txt - - TestConfigurations.xml - Always - Designer + + TestConfigurationsTemplate.xml PreserveNewest @@ -159,6 +157,13 @@ PreserveNewest + + + TestConfigurations.xml + Always + Designer + + diff --git a/Test/WindowsRuntime/TestBase.cs b/Test/WindowsRuntime/TestBase.cs index b2d4b8841..a410edae5 100644 --- a/Test/WindowsRuntime/TestBase.cs +++ b/Test/WindowsRuntime/TestBase.cs @@ -28,13 +28,20 @@ public partial class TestBase { static TestBase() { - StorageFile xmlFile = Package.Current.InstalledLocation.GetFileAsync(TestConfigurations.DefaultTestConfigFilePath).AsTask().Result; - XmlDocument xmlDoc = XmlDocument.LoadFromFileAsync(xmlFile).AsTask().Result; + try + { + StorageFile xmlFile = Package.Current.InstalledLocation.GetFileAsync(TestConfigurations.DefaultTestConfigFilePath).AsTask().Result; + XmlDocument xmlDoc = XmlDocument.LoadFromFileAsync(xmlFile).AsTask().Result; - XDocument doc = XDocument.Parse(xmlDoc.GetXml()); - TestConfigurations configurations = TestConfigurations.ReadFromXml(doc); + XDocument doc = XDocument.Parse(xmlDoc.GetXml()); + TestConfigurations configurations = TestConfigurations.ReadFromXml(doc); - TestBase.Initialize(configurations); + TestBase.Initialize(configurations); + } + catch (System.IO.FileNotFoundException) + { + throw new System.IO.FileNotFoundException("To run tests you need to supply a TestConfigurations.xml file with credentials in the Test/Common folder. Use TestConfigurationsTemplate.xml as a template."); + } } } } diff --git a/changelog.txt b/changelog.txt index 1d01d1194..d4d6b8401 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +Changes since 6.2.2-preview : + +- All: TestConfigurations.xml has been deleted and added to the .gitignore file to keep users from accidentally leaking their credentials. To continue running tests, simply add the same file back after you get the latest code. + Changes in 6.2.2-preview : - All: Fixed bug with CoreCLR UserAgent string.