Esempio n. 1
0
            public void ReturnsMemoryLimit()
            {
                ulong limitInBytes = 2048;

                JobObject.GetJobMemoryLimit().Returns(limitInBytes);
                Assert.Equal(limitInBytes, Container.CurrentMemoryLimit());
            }
Esempio n. 2
0
            public void StartsExeWithCorrectOptions()
            {
                JobObject.GetJobMemoryLimit().Returns(6789UL);
                Container.StartGuard();

                var actual = ProcessRunner.Captured(x => x.Run(null)).Arg <ProcessRunSpec>();

                Assert.Equal(@"C:\Containers\handle\bin\Guard.exe", actual.ExecutablePath);
                Assert.Equal(2, actual.Arguments.Length);
                Assert.Equal(_containerUsername, actual.Arguments[0]);
                Assert.Equal(Container.Id, actual.Arguments[1]);
                Assert.Equal(@"C:\Containers\handle\user\", actual.WorkingDirectory);
                Assert.Null(actual.Credentials);
            }
Esempio n. 3
0
 public ulong CurrentMemoryLimit()
 {
     return(jobObject.GetJobMemoryLimit());
 }