Package org.apache.aurora.gen

Examples of org.apache.aurora.gen.SessionKey


  }

  @Test
  public void testFlaggedMethodDisabled() throws Exception {
    JobConfiguration job = new JobConfiguration();
    SessionKey session = new SessionKey();

    control.replay();

    Iface thrift = getIface(ImmutableMap.of("createJob", false));
    assertEquals(ResponseCode.ERROR, thrift.createJob(job, null, session).getResponseCode());
View Full Code Here


  }

  private void setQuota(String user, boolean allowed) throws Exception {
    assertEquals(
        allowed ? OK : AUTH_FAILED,
        thrift.setQuota(USER, QUOTA.newBuilder(), new SessionKey().setData(user.getBytes()))
            .getResponseCode());
  }
View Full Code Here

  }

  private void setQuota(String user, boolean allowed) throws Exception {
    assertEquals(
        allowed ? OK : AUTH_FAILED,
        thrift.setQuota(USER, QUOTA.newBuilder(), new SessionKey().setData(user.getBytes()))
            .getResponseCode());
  }
View Full Code Here

  @Test
  public void testCreateJob() throws Exception {
    Lock lock = new Lock()
        .setKey(LockKey.job(new JobKey("role", "env", "name")))
        .setToken("token");
    SessionKey session = new SessionKey()
        .setData("session data".getBytes(StandardCharsets.UTF_8))
        .setMechanism("fake");
    Response response = new Response()
        .setResponseCode(OK);
View Full Code Here

TOP

Related Classes of org.apache.aurora.gen.SessionKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.