Project

General

Profile

« Previous | Next » 

Revision 2247

Added by sgarg over 20 years ago

Some changes and a bug fix

View differences:

test/edu/ucsb/nceas/metacattest/AccessControlTest.java
187 187
    TestSuite suite = new TestSuite();
188 188
    suite.addTest(new AccessControlTest("initialize"));
189 189
    // Test basic functions
190
    //suite.addTest(new AccessControlTest("login"));
191
    //suite.addTest(new AccessControlTest("insert"));
192
    //suite.addTest(new AccessControlTest("read"));
193
    //suite.addTest(new AccessControlTest("update"));
194
    //suite.addTest(new AccessControlTest("delete"));
190
    suite.addTest(new AccessControlTest("login"));
191
    suite.addTest(new AccessControlTest("insert"));
192
    suite.addTest(new AccessControlTest("read"));
193
    suite.addTest(new AccessControlTest("update"));
194
    suite.addTest(new AccessControlTest("delete"));
195 195
    // Tests when no access is specified
196 196
    suite.addTest(new AccessControlTest("noAccessSpecified_Owner"));
197 197
    //suite.addTest(new AccessControlTest("noAccessSpecified_Random"));
......
395 395

  
396 396
      // update the online data
397 397
      uploadDocid(onlineDocid + ".2", onlinetestdatafile2, SUCCESS);
398
      //  read document and check if it is same as the document which was written
399
      // the second time      
398 400

  
399 401
      // update the document access control
400
      //updateDocid(newdocid + ".5", testdocument, SUCCESS);
401
      //readDocidWhichEqualsDoc(newdocid + ".5", testdocument, SUCCESS);
402
      testdocument = getTestEmlDoc("Testing update inline", testEmlInlineBlock2,
403
                                   null, null, null);
404
      updateDocid(newdocid + ".5", testdocument, SUCCESS);
405
      readDocidWhichEqualsDoc(newdocid + ".5", testdocument, SUCCESS);
402 406

  
403 407
      // update the document access control for inline data
404
      //updateDocid(newdocid + ".6", testdocument, SUCCESS);
405
      //readDocidWhichEqualsDoc(newdocid + ".6", testdocument, SUCCESS);
408
      testdocument = getTestEmlDoc("Testing update inline", testEmlInlineBlock2,
409
                                   null, null, null);
410
      updateDocid(newdocid + ".6", testdocument, SUCCESS);
411
      readDocidWhichEqualsDoc(newdocid + ".6", testdocument, SUCCESS);
406 412

  
407 413
      // update the document access control for online data
408
      //updateDocid(newdocid + ".7", testdocument, SUCCESS);
409
      //readDocidWhichEqualsDoc(newdocid + ".7", testdocument, SUCCESS);
414
      testdocument = getTestEmlDoc("Testing update inline", testEmlInlineBlock2,
415
                                   null, null, null);
416
      updateDocid(newdocid + ".7", testdocument, SUCCESS);
417
      readDocidWhichEqualsDoc(newdocid + ".7", testdocument, SUCCESS);
410 418

  
411 419
      // delete the document
412
      deleteDocid(newdocid, SUCCESS);
420
      deleteDocid(newdocid + ".3", SUCCESS);
413 421
      m.logout();
414 422
    }
415 423
    catch (MetacatAuthException mae) {

Also available in: Unified diff