Search in sources :

Example 6 with JobType.systemTest

use of com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.systemTest in project vespa by vespa-engine.

the class DeploymentTriggerTest method testSuccessfulDeploymentApplicationPackageChanged.

@Test
public void testSuccessfulDeploymentApplicationPackageChanged() {
    DeploymentTester tester = new DeploymentTester();
    DeploymentQueue deploymentQueue = tester.deploymentQueue();
    TenantId tenant = tester.controllerTester().createTenant("tenant1", "domain1", 1L);
    Application application = tester.controllerTester().createApplication(tenant, "app1", "default", 1L);
    ApplicationPackage previousApplicationPackage = new ApplicationPackageBuilder().environment(Environment.prod).region("corp-us-east-1").region("us-central-1").region("us-west-1").build();
    ApplicationPackage newApplicationPackage = new ApplicationPackageBuilder().environment(Environment.prod).region("corp-us-east-1").region("us-central-1").region("us-west-1").region("eu-west-1").build();
    // Component job finishes
    tester.jobCompletion(component).application(application).uploadArtifact(newApplicationPackage).submit();
    // Application is deployed to all test environments and declared zones
    tester.deployAndNotify(application, newApplicationPackage, true, JobType.systemTest);
    tester.deploy(JobType.stagingTest, application, previousApplicationPackage, true);
    tester.deployAndNotify(application, newApplicationPackage, true, JobType.stagingTest);
    tester.deployAndNotify(application, newApplicationPackage, true, JobType.productionCorpUsEast1);
    tester.deployAndNotify(application, newApplicationPackage, true, JobType.productionUsCentral1);
    tester.deployAndNotify(application, newApplicationPackage, true, JobType.productionUsWest1);
    tester.deployAndNotify(application, newApplicationPackage, true, JobType.productionEuWest1);
    assertTrue("All jobs consumed", deploymentQueue.jobs().isEmpty());
}
Also used : TenantId(com.yahoo.vespa.hosted.controller.api.identifiers.TenantId) Application(com.yahoo.vespa.hosted.controller.Application) LockedApplication(com.yahoo.vespa.hosted.controller.LockedApplication) ApplicationPackage(com.yahoo.vespa.hosted.controller.application.ApplicationPackage) JobType.systemTest(com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.systemTest) Test(org.junit.Test) JobType.stagingTest(com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.stagingTest)

Aggregations

Application (com.yahoo.vespa.hosted.controller.Application)6 LockedApplication (com.yahoo.vespa.hosted.controller.LockedApplication)6 ApplicationPackage (com.yahoo.vespa.hosted.controller.application.ApplicationPackage)6 JobType.stagingTest (com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.stagingTest)6 JobType.systemTest (com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType.systemTest)6 Test (org.junit.Test)6 TenantId (com.yahoo.vespa.hosted.controller.api.identifiers.TenantId)3 Version (com.yahoo.component.Version)1 ApplicationVersion (com.yahoo.vespa.hosted.controller.application.ApplicationVersion)1