use of org.sonarsource.sonarlint.core.proto.Sonarlint.StorageStatus in project sonarlint-core by SonarSource.
the class ConnectedFileExclusionsMediumTest method writeModuleStatus.
private static void writeModuleStatus(Path storage, String name, String version) throws IOException {
Path module = storage.resolve("local").resolve("modules").resolve(name);
StorageStatus storageStatus = StorageStatus.newBuilder().setStorageVersion(StoragePaths.STORAGE_VERSION).setClientUserAgent("agent").setSonarlintCoreVersion(version).setUpdateTimestamp(new Date().getTime()).build();
Files.createDirectories(module);
ProtobufUtil.writeToFile(storageStatus, module.resolve(StoragePaths.STORAGE_STATUS_PB));
}
use of org.sonarsource.sonarlint.core.proto.Sonarlint.StorageStatus in project sonarlint-core by SonarSource.
the class ConnectedFileExclusionsMediumTest method writeStatus.
private static void writeStatus(Path storage, String version) throws IOException {
Path module = storage.resolve("local").resolve("global");
StorageStatus storageStatus = StorageStatus.newBuilder().setStorageVersion(StoragePaths.STORAGE_VERSION).setClientUserAgent("agent").setSonarlintCoreVersion(version).setUpdateTimestamp(new Date().getTime()).build();
Files.createDirectories(module);
ProtobufUtil.writeToFile(storageStatus, module.resolve(StoragePaths.STORAGE_STATUS_PB));
}
use of org.sonarsource.sonarlint.core.proto.Sonarlint.StorageStatus in project sonarlint-core by SonarSource.
the class ConnectedIssueMediumTest method writeModuleStatus.
private static void writeModuleStatus(Path storage, String name, String version) throws IOException {
Path module = storage.resolve(StoragePaths.encodeForFs(SERVER_ID)).resolve("modules").resolve(name);
StorageStatus storageStatus = StorageStatus.newBuilder().setStorageVersion(version).setClientUserAgent("agent").setSonarlintCoreVersion("1.0").setUpdateTimestamp(new Date().getTime()).build();
Files.createDirectories(module);
ProtobufUtil.writeToFile(storageStatus, module.resolve(StoragePaths.STORAGE_STATUS_PB));
}
use of org.sonarsource.sonarlint.core.proto.Sonarlint.StorageStatus in project sonarlint-core by SonarSource.
the class ConnectedIssueMediumTest method writeStatus.
private static void writeStatus(Path storage, String version) throws IOException {
Path module = storage.resolve(StoragePaths.encodeForFs(SERVER_ID)).resolve("global");
StorageStatus storageStatus = StorageStatus.newBuilder().setStorageVersion(StoragePaths.STORAGE_VERSION).setClientUserAgent("agent").setSonarlintCoreVersion(version).setUpdateTimestamp(new Date().getTime()).build();
Files.createDirectories(module);
ProtobufUtil.writeToFile(storageStatus, module.resolve(StoragePaths.STORAGE_STATUS_PB));
}
use of org.sonarsource.sonarlint.core.proto.Sonarlint.StorageStatus in project sonarlint-core by SonarSource.
the class ConnectedStaleStorageMediumTest method writeUpdateStatus.
private static void writeUpdateStatus(Path storage, String version) throws IOException {
StorageStatus storageStatus = StorageStatus.newBuilder().setStorageVersion(version).setClientUserAgent("agent").setSonarlintCoreVersion("1.0").setUpdateTimestamp(new Date().getTime()).build();
Path global = storage.resolve("global");
Files.createDirectories(global);
ProtobufUtil.writeToFile(storageStatus, global.resolve(StoragePaths.STORAGE_STATUS_PB));
}
Aggregations