Exemplo n.º 1
0
 protected void CreateEnlistment(string commitish = null)
 {
     this.Enlistment = ScalarFunctionalTestEnlistment.Clone(
         ScalarTestConfig.PathToScalar,
         commitish: commitish,
         fullClone: this.validateWorkingTree != Settings.ValidateWorkingTreeMode.SparseMode);
     GitProcess.Invoke(this.Enlistment.RepoRoot, "config advice.statusUoption false");
     this.ControlGitRepo = ControlGitRepo.Create(commitish);
     this.ControlGitRepo.Initialize();
 }
Exemplo n.º 2
0
 public virtual void CreateEnlistment()
 {
     if (this.forcePerRepoObjectCache)
     {
         this.Enlistment = ScalarFunctionalTestEnlistment.CloneWithPerRepoCache(
             ScalarTestConfig.PathToScalar,
             this.skipFetchCommitsAndTreesDuringClone);
     }
     else
     {
         this.Enlistment = ScalarFunctionalTestEnlistment.Clone(ScalarTestConfig.PathToScalar, fullClone: this.fullClone);
     }
 }
Exemplo n.º 3
0
 protected ScalarFunctionalTestEnlistment CreateNewEnlistment(
     string localCacheRoot = null,
     string branch = null,
     bool skipFetchCommitsAndTrees = false)
 {
     ScalarFunctionalTestEnlistment output = ScalarFunctionalTestEnlistment.Clone(
         ScalarTestConfig.PathToScalar,
         branch,
         localCacheRoot,
         skipFetchCommitsAndTrees);
     this.enlistmentsToDelete.Add(output);
     return output;
 }
Exemplo n.º 4
0
        public void CloneCreatesCorrectFilesInRoot()
        {
            ScalarFunctionalTestEnlistment enlistment = ScalarFunctionalTestEnlistment.Clone(ScalarTestConfig.PathToScalar);

            try
            {
                Directory.GetFiles(enlistment.EnlistmentRoot).ShouldBeEmpty("There should be no files in the enlistment root after cloning");
                string[] directories = Directory.GetDirectories(enlistment.EnlistmentRoot);
                directories.Length.ShouldEqual(1);
                directories.ShouldContain(x => Path.GetFileName(x).Equals("src", StringComparison.Ordinal));
            }
            finally
            {
                enlistment.DeleteAll();
            }
        }