Esempio n. 1
0
        public void JsSelfCheckTest()
        {
            var sandboxesDirectory = new DirectoryInfo(Path.GetFullPath(Path.Combine(baseDirectory, "../../../../../sandboxes/")));

            foreach (var dir in sandboxesDirectory.GetDirectories())
            {
                var res = new SelfChecker(new DockerSandboxRunner())
                          .SelfCheck(dir);
                Assert.AreEqual(Verdict.Ok, res.Verdict);
            }
        }
Esempio n. 2
0
        private void SelfCheck(string sandboxesDirectoryPath)
        {
            var sandboxesDirectory = new DirectoryInfo(sandboxesDirectoryPath);

            foreach (var dir in sandboxesDirectory.GetDirectories())
            {
                var res = new SelfChecker(new DockerSandboxRunner())
                          .SelfCheck(dir);
                Console.WriteLine($"Verdict is {res.Verdict} for {dir.Name}");
            }
        }
Esempio n. 3
0
        public void SelfCheckTest()
        {
            var sandboxesDirectory = new DirectoryInfo(Path.GetFullPath(Path.Combine(baseDirectory, "../../../../../sandboxes/")));

            foreach (var dir in sandboxesDirectory.GetDirectories())
            {
                var sampleDir = new DirectoryInfo(Path.GetFullPath(Path.Combine(dir.FullName, "sample/")));
                if (!sampleDir.Exists)
                {
                    continue;
                }
                var res = new SelfChecker(new DockerSandboxRunner())
                          .SelfCheck(dir);
                Assert.AreEqual(Verdict.Ok, res.Verdict);
            }
        }