Esempio n. 1
0
 @Before
 public void setUp() {
   RaptureConfig.setLoadYaml(false);
   Kernel.initBootstrap();
   this.repo = new RepoApiImpl(Kernel.INSTANCE);
   this.callingContext = new CallingContext();
   this.callingContext.setUser("dummy");
   Kernel.INSTANCE.clearRepoCache(false);
 }
Esempio n. 2
0
 @Before
 public void setup() {
   Kernel.INSTANCE.restart();
   Kernel.initBootstrap();
   if (!Kernel.getBlob().blobRepoExists(ctx, "//blobapitestrepo")) {
     Kernel.getBlob()
         .createBlobRepo(
             ctx, "//blobapitestrepo", "BLOB {} USING MEMORY {}", "REP {} USING MEMORY {}");
   }
 }
Esempio n. 3
0
 @Override
 public void updateRemoteApiKey(CallingContext context, String name, String apiKey) {
   checkParameter(NAME, name);
   checkParameter("ApiKey", apiKey); // $NON-NLS-1$
   RaptureRemote ret = Kernel.INSTANCE.getRemote(name);
   if (ret == null) {
     throw RaptureExceptionFactory.create(
         HttpURLConnection.HTTP_BAD_REQUEST,
         Messages.getString("Admin.NoFindRemote") + name); // $NON-NLS-1$
   } else {
     ret.setApiKey(apiKey);
     RaptureRemoteStorage.add(
         ret, context.getUser(), Messages.getString("Admin.UpdatedApi")); // $NON-NLS-1$
   }
 }
Esempio n. 4
0
 @After
 public void tearDown() {
   Kernel.INSTANCE.clearRepoCache(false);
 }