Search in sources :

Example 6 with Config

use of co.cask.cdap.api.Config in project cdap by caskdata.

the class AppLifecycleHttpHandlerTest method testDeployUsingNonexistantArtifact404.

@Test
public void testDeployUsingNonexistantArtifact404() throws Exception {
    Id.Application appId = Id.Application.from(Id.Namespace.DEFAULT, "badapp");
    AppRequest<Config> appRequest = new AppRequest<>(new ArtifactSummary("something", "1.0.0"), null);
    HttpResponse response = deploy(appId, appRequest);
    Assert.assertEquals(404, response.getStatusLine().getStatusCode());
}
Also used : ArtifactSummary(co.cask.cdap.api.artifact.ArtifactSummary) Config(co.cask.cdap.api.Config) HttpResponse(org.apache.http.HttpResponse) NamespaceId(co.cask.cdap.proto.id.NamespaceId) Id(co.cask.cdap.proto.Id) ProgramId(co.cask.cdap.proto.id.ProgramId) ArtifactId(co.cask.cdap.proto.id.ArtifactId) ApplicationId(co.cask.cdap.proto.id.ApplicationId) AppRequest(co.cask.cdap.proto.artifact.AppRequest) Test(org.junit.Test)

Aggregations

Config (co.cask.cdap.api.Config)6 ArtifactSummary (co.cask.cdap.api.artifact.ArtifactSummary)4 Id (co.cask.cdap.proto.Id)3 AppRequest (co.cask.cdap.proto.artifact.AppRequest)3 ApplicationId (co.cask.cdap.proto.id.ApplicationId)3 ProgramId (co.cask.cdap.proto.id.ProgramId)3 Application (co.cask.cdap.api.app.Application)2 NamespaceId (co.cask.cdap.proto.id.NamespaceId)2 IOException (java.io.IOException)2 Test (org.junit.Test)2 AbstractApplication (co.cask.cdap.api.app.AbstractApplication)1 ApplicationContext (co.cask.cdap.api.app.ApplicationContext)1 ApplicationClass (co.cask.cdap.api.artifact.ApplicationClass)1 ArtifactVersion (co.cask.cdap.api.artifact.ArtifactVersion)1 FormatSpecification (co.cask.cdap.api.data.format.FormatSpecification)1 Schema (co.cask.cdap.api.data.schema.Schema)1 UnsupportedTypeException (co.cask.cdap.api.data.schema.UnsupportedTypeException)1 PluginConfig (co.cask.cdap.api.plugin.PluginConfig)1 DefaultAppConfigurer (co.cask.cdap.app.DefaultAppConfigurer)1 DistributedSparkProgramRunner (co.cask.cdap.app.runtime.spark.distributed.DistributedSparkProgramRunner)1