コード例 #1
0
        public void should_update_xentools()
        {
            _sleeper.Expect(x => x.Sleep(Arg <int> .Is.Anything));
            _connectionChecker.Expect(x => x.Check());
            _downloader.Expect(x => x.Download("http://something.com/file.zip", Constants.XenToolsReleasePackage));
            _checksumValidator.Expect(x => x.Validate("544564abc453de787ad", Constants.XenToolsReleasePackage));
            _unzipper.Expect(x => x.Unzip(Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything));
            _installer.Expect(x => x.Install(new Dictionary <string, string>
            {
                {
                    Constants.XenToolsUnzipPath,
                    "/S /norestart /D=" + Constants.XenToolsPath
                }
            }));
            _finalizer.Expect(x => x.Finalize(new List <string>
            {
                Constants.XenToolsUnzipPath,
                Constants.XenToolsReleasePackage
            }
                                              ));
            _serviceRestarter.Expect(x => x.Restart("xensvc"));
            _serviceRestarter.Expect(x => x.Restart("XenServerVssProvider"));

            _xentoolsUpdate.Execute(_agentUpdateInfo);
        }
コード例 #2
0
        public void should_update_xentools()
        {
            _sleeper.Expect(x => x.Sleep(Arg <int> .Is.Anything));
            _connectionChecker.Expect(x => x.Check());
            _downloader.Expect(x => x.Download("http://something.com/file.zip", Constants.XenToolsReleasePackage));
            _checksumValidator.Expect(x => x.Validate("544564abc453de787ad", Constants.XenToolsReleasePackage));
            _unzipper.Expect(x => x.Unzip(Arg <string> .Is.Anything, Arg <string> .Is.Anything, Arg <string> .Is.Anything));
            _serviceStopper.Expect(x => x.Stop("RackspaceCloudServersAgentUpdater"));
            _fileCopier.Expect(x => x.CopyFiles(Constants.UpdaterUnzipPath, Constants.UpdaterPath, _logger));
            _finalizer.Expect(x => x.Finalize(new List <string>
            {
                Constants.UpdaterUnzipPath,
                Constants.UpdaterReleasePackage
            }
                                              ));
            _serviceStarter.Expect(x => x.Start("RackspaceCloudServersAgentUpdater"));

            _updaterUpdate.Execute(_agentUpdateInfo);
        }