/** * Return meta information about the Skipper server. * * @return Detailed information about the enabled features, versions of implementation * libraries, and security configuration */ @RequestMapping(method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public AboutResource getAboutResource() { final AboutResource aboutResource = new AboutResource(); final VersionInfo versionInfo = getVersionInfo(); aboutResource.setVersionInfo(versionInfo); return aboutResource; }
/** * Return meta information about the Skipper server. * * @return Detailed information about the enabled features, versions of implementation * libraries, and security configuration */ @RequestMapping(method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public AboutResource getAboutResource() { final AboutResource aboutResource = new AboutResource(); final VersionInfo versionInfo = getVersionInfo(); aboutResource.setVersionInfo(versionInfo); return aboutResource; }
@Bean @Primary public SkipperClient skipperClientMock() { SkipperClient skipperClient = mock(SkipperClient.class); AboutResource about = new AboutResource(); about.setVersionInfo(new VersionInfo()); about.getVersionInfo().setServer(new Dependency()); about.getVersionInfo().getServer().setName("Test Server"); about.getVersionInfo().getServer().setVersion("Test Version"); when(skipperClient.info()).thenReturn(about); when(skipperClient.listDeployers()).thenReturn(new Resources<>(new ArrayList<>(), new ArrayList<>())); return skipperClient; }
public void mockSkipperAboutInfo() { AboutResource about = new AboutResource(); about.setVersionInfo(new VersionInfo()); about.getVersionInfo().setServer(new Dependency()); about.getVersionInfo().getServer().setName("Test Server"); about.getVersionInfo().getServer().setVersion("Test Version"); when(this.skipperClient.info()).thenReturn(about); when(this.skipperClient.listDeployers()).thenReturn(new Resources<>(new ArrayList<>(), new ArrayList<>())); }