Initial implementation of dashboard API
Add an initial framework for the dashboard API. There is no REST endpoint for creating a project dashboard; a new dashboard can only be created manually by adding a config file to the special refs/meta/dashboards ref [1]. Thus, the intial version of the API only supports getting a named dashboard, and the test serves only to ensure that the binding of the new API works, i.e. does not cause any guice injection errors, etc. Later commits will extend the API support: - REST API and API to create a dashboard - List dashboards - etc [1] http://gerrit-documentation.storage.googleapis.com/Documentation/2.14/user-dashboards.html#project-dashboards Change-Id: I85d5f91fa27540e8942709c014bb51a0ec427eff
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2017 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.acceptance.api.project;
|
||||
|
||||
import com.google.gerrit.acceptance.AbstractDaemonTest;
|
||||
import com.google.gerrit.acceptance.NoHttpd;
|
||||
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
|
||||
import org.junit.Test;
|
||||
|
||||
@NoHttpd
|
||||
public class DashboardIT extends AbstractDaemonTest {
|
||||
@Test
|
||||
public void defaultDashboardDoesNotExist() throws Exception {
|
||||
exception.expect(ResourceNotFoundException.class);
|
||||
gApi.projects().name(project.get()).dashboard("default").get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user