Browse Source

[NO JIRA] Fix Its (#135)

tags/4.8.0.2856
Duarte Meneses 1 year ago
parent
commit
78653325d9
No account linked to committer's email address

+ 5
- 6
it/src/test/java/com/sonarsource/scanner/it/ScannerTestCase.java View File

import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import static java.util.Collections.singletonList; import static java.util.Collections.singletonList;


public abstract class ScannerTestCase { public abstract class ScannerTestCase {
private static final String DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ssZ";
private static final DateTimeFormatter DATETIME_FORMATTER = DateTimeFormatter.ofPattern(DATETIME_FORMAT);


private static final Logger LOG = LoggerFactory private static final Logger LOG = LoggerFactory
.getLogger(ScannerTestCase.class); .getLogger(ScannerTestCase.class);


@After @After
public void resetData() { public void resetData() {
// The expected format is yyyy-MM-dd.
String currentDateTime = DateTimeFormatter.ISO_LOCAL_DATE
.withZone(ZoneId.of("UTC"))
.format(Instant.now());
String currentDateTime = ZonedDateTime.now().format(DATETIME_FORMATTER);


orchestrator.getServer() orchestrator.getServer()
.newHttpCall("/api/projects/bulk_delete") .newHttpCall("/api/projects/bulk_delete")

Loading…
Cancel
Save