public void TestConfigOnlyFabricUpgradeWithRunAs() { string currentExecutingDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string configurationCsvFilePath = Path.Combine(currentExecutingDirectory, "Configurations.csv"); string[] manifests = new string[] { "ClusterManifest-WithoutDiagnostics.xml", "ClusterManifest-WithRunAs.xml" }; FabricVersion[] fabricVersion = new FabricVersion[2]; for (int i = 0; i < 2; i++) { using (FabricLayoutInfo fabricLayoutInfo = new FabricLayoutInfo(this.imageStore, manifests[i])) { fabricLayoutInfo.PatchVersion = null; string codePath, configPath, infrastructureManifestFilePath; fabricLayoutInfo.Create(out codePath, out configPath, out infrastructureManifestFilePath); fabricVersion[i] = this.imageBuilder.GetFabricVersionInfo(codePath, configPath, TestUtility.ImageStoreDefaultTimeout); this.imageBuilder.ProvisionFabric( codePath, configPath, configurationCsvFilePath, infrastructureManifestFilePath, TimeSpan.MaxValue); TestUtility.VerifyWinFabLayout(fabricLayoutInfo); } } this.imageBuilder.UpgradeFabric( fabricVersion[0].ToString(), fabricVersion[1].ToString(), configurationCsvFilePath, TimeSpan.MaxValue); }
public void TestProvisionFabricWithMSI() { using (FabricLayoutInfo fabricLayoutInfo = new FabricLayoutInfo(this.imageStore)) { string codePath, configPath, infrastructureManifestFilePath; fabricLayoutInfo.Create(out codePath, out configPath, out infrastructureManifestFilePath); ImageBuilderExeTestWrapper exeWrapper = new ImageBuilderExeTestWrapper(this.imageStore); int exitCode = exeWrapper.ProvisionFabric( codePath, configPath, infrastructureManifestFilePath); Verify.AreEqual(exitCode, 0); TestUtility.VerifyWinFabLayout(fabricLayoutInfo); } }
public void TestProvisionOfDefaultImageStoreConnectionString() { using (FabricLayoutInfo fabricLayoutInfo = new FabricLayoutInfo(this.imageStore)) { string defaultImageStoreConnectionString = "_default_"; fabricLayoutInfo.PatchVersion = null; TestUtility.AddToFabricSettings( FabricValidatorConstants.SectionNames.Management, FabricValidatorConstants.ParameterNames.ImageStoreConnectionString, defaultImageStoreConnectionString, false /*isEncrypted*/, fabricLayoutInfo.ClusterManifest); string codePath, configPath, infrastructureManifestFilePath; fabricLayoutInfo.Create(out codePath, out configPath, out infrastructureManifestFilePath); string currentExecutingDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string configurationCsvFilePath = Path.Combine(currentExecutingDirectory, "Configurations.csv"); this.imageBuilder.ProvisionFabric( codePath, configPath, configurationCsvFilePath, infrastructureManifestFilePath, TimeSpan.MaxValue); string clusterManifestPath = Path.Combine( "WindowsFabricStore", string.Format("ClusterManifest.{0}.xml", fabricLayoutInfo.ClusterManifest.Version)); var provisionedClusterManifest = fabricLayoutInfo.ImageStoreWrapper.GetFromStore <ClusterManifestType>(clusterManifestPath, TestUtility.ImageStoreDefaultTimeout); var imageStoreConnectionStringValue = provisionedClusterManifest.FabricSettings.First( section => TestUtility.Equals(section.Name, FabricValidatorConstants.SectionNames.Management)).Parameter.First( parameter => TestUtility.Equals(parameter.Name, FabricValidatorConstants.ParameterNames.ImageStoreConnectionString)).Value; Verify.AreNotEqual(imageStoreConnectionStringValue, defaultImageStoreConnectionString); Verify.IsTrue(imageStoreConnectionStringValue.StartsWith("file:")); TestUtility.VerifyWinFabLayout(fabricLayoutInfo); } }
public void TestProvisionFabricWithMSI() { using (FabricLayoutInfo fabricLayoutInfo = new FabricLayoutInfo(this.imageStore)) { string codePath, configPath, infrastructureManifestFilePath; fabricLayoutInfo.Create(out codePath, out configPath, out infrastructureManifestFilePath); string currentExecutingDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string configurationCsvFilePath = Path.Combine(currentExecutingDirectory, "Configurations.csv"); this.imageBuilder.ProvisionFabric( codePath, configPath, configurationCsvFilePath, infrastructureManifestFilePath, TimeSpan.MaxValue); TestUtility.VerifyWinFabLayout(fabricLayoutInfo); } }