public TestHttpFSFWithSWebhdfsFileSystem(BaseTestHttpFSWith.Operation operation)
     : base(operation)
 {
     {
         Uri url = Sharpen.Thread.CurrentThread().GetContextClassLoader().GetResource("classutils.txt"
                                                                                      );
         classpathDir = url.ToExternalForm();
         if (classpathDir.StartsWith("file:"))
         {
             classpathDir = Sharpen.Runtime.Substring(classpathDir, "file:".Length);
             classpathDir = Sharpen.Runtime.Substring(classpathDir, 0, classpathDir.Length - "/classutils.txt"
                                                      .Length);
         }
         else
         {
             throw new RuntimeException("Cannot find test classes dir");
         }
         FilePath @base = new FilePath(Basedir);
         FileUtil.FullyDelete(@base);
         @base.Mkdirs();
         string keyStoreDir = new FilePath(Basedir).GetAbsolutePath();
         try
         {
             sslConf = new Configuration();
             KeyStoreTestUtil.SetupSSLConfig(keyStoreDir, classpathDir, sslConf, false);
         }
         catch (Exception ex)
         {
             throw new RuntimeException(ex);
         }
         jettyTestHelper = new TestJettyHelper("jks", keyStoreDir + "/serverKS.jks", "serverP"
                                               );
     }
 }
Esempio n. 2
0
        /// <exception cref="System.Exception"/>
        private void Operation(BaseTestHttpFSWith.Operation op)
        {
            switch (op)
            {
            case BaseTestHttpFSWith.Operation.Get:
            {
                TestGet();
                break;
            }

            case BaseTestHttpFSWith.Operation.Open:
            {
                TestOpen();
                break;
            }

            case BaseTestHttpFSWith.Operation.Create:
            {
                TestCreate();
                break;
            }

            case BaseTestHttpFSWith.Operation.Append:
            {
                TestAppend();
                break;
            }

            case BaseTestHttpFSWith.Operation.Truncate:
            {
                TestTruncate();
                break;
            }

            case BaseTestHttpFSWith.Operation.Concat:
            {
                TestConcat();
                break;
            }

            case BaseTestHttpFSWith.Operation.Rename:
            {
                TestRename();
                break;
            }

            case BaseTestHttpFSWith.Operation.Delete:
            {
                TestDelete();
                break;
            }

            case BaseTestHttpFSWith.Operation.ListStatus:
            {
                TestListStatus();
                break;
            }

            case BaseTestHttpFSWith.Operation.WorkingDirectory:
            {
                TestWorkingdirectory();
                break;
            }

            case BaseTestHttpFSWith.Operation.Mkdirs:
            {
                TestMkdirs();
                break;
            }

            case BaseTestHttpFSWith.Operation.SetTimes:
            {
                TestSetTimes();
                break;
            }

            case BaseTestHttpFSWith.Operation.SetPermission:
            {
                TestSetPermission();
                break;
            }

            case BaseTestHttpFSWith.Operation.SetOwner:
            {
                TestSetOwner();
                break;
            }

            case BaseTestHttpFSWith.Operation.SetReplication:
            {
                TestSetReplication();
                break;
            }

            case BaseTestHttpFSWith.Operation.Checksum:
            {
                TestChecksum();
                break;
            }

            case BaseTestHttpFSWith.Operation.ContentSummary:
            {
                TestContentSummary();
                break;
            }

            case BaseTestHttpFSWith.Operation.Fileacls:
            {
                TestFileAcls();
                break;
            }

            case BaseTestHttpFSWith.Operation.Diracls:
            {
                TestDirAcls();
                break;
            }

            case BaseTestHttpFSWith.Operation.SetXattr:
            {
                TestSetXAttr();
                break;
            }

            case BaseTestHttpFSWith.Operation.RemoveXattr:
            {
                TestRemoveXAttr();
                break;
            }

            case BaseTestHttpFSWith.Operation.GetXattrs:
            {
                TestGetXAttrs();
                break;
            }

            case BaseTestHttpFSWith.Operation.ListXattrs:
            {
                TestListXAttrs();
                break;
            }
            }
        }
Esempio n. 3
0
 public BaseTestHttpFSWith(BaseTestHttpFSWith.Operation operation)
 {
     this.operation = operation;
 }
Esempio n. 4
0
 public TestHttpFSFWithWebhdfsFileSystem(BaseTestHttpFSWith.Operation operation)
     : base(operation)
 {
 }
Esempio n. 5
0
 public TestHttpFSFileSystemLocalFileSystem(BaseTestHttpFSWith.Operation operation
                                            )
     : base(operation)
 {
 }