diff options
author | Martin Polden <mpolden@mpolden.no> | 2022-02-15 11:20:41 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2022-02-15 11:20:41 +0100 |
commit | a920823a0a707c9befac9701f51b1fcdecc57a9d (patch) | |
tree | 2ba2272628f03ad6263b29f326ec7e872e223fa5 /routing-generator | |
parent | c982c5ddfc7aa8c76868a7cd6041482cde8cb189 (diff) |
Simplify
Diffstat (limited to 'routing-generator')
-rw-r--r-- | routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java | 4 | ||||
-rw-r--r-- | routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java b/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java index 408deabbcb6..e75717d8ac1 100644 --- a/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java +++ b/routing-generator/src/main/java/com/yahoo/vespa/hosted/routing/nginx/Nginx.java @@ -117,9 +117,9 @@ public class Nginx implements Router { String configBasename = NginxPath.config.in(fileSystem).getFileName().toString(); Files.list(NginxPath.root.in(fileSystem)) .filter(Files::isRegularFile) - .filter(path -> path.getFileName().getFileName().toString().startsWith(configBasename) || + .filter(path -> path.getFileName().toString().startsWith(configBasename) || // TODO(mpolden): This cleans up old layer 7 files. Remove after 2022-03-15 - path.getFileName().getFileName().toString().startsWith("nginx.conf-")) + path.getFileName().toString().startsWith("nginx.conf-")) .filter(path -> rotatedAt(path).map(instant -> instant.isBefore(oneWeekAgo)) .orElse(false)) .forEach(path -> Exceptions.uncheck(() -> Files.deleteIfExists(path))); diff --git a/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java b/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java index f422ae411db..e79b3e8787e 100644 --- a/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java +++ b/routing-generator/src/test/java/com/yahoo/vespa/hosted/routing/nginx/NginxTest.java @@ -55,8 +55,8 @@ public class NginxTest { .assertMetric(Nginx.GENERATED_UPSTREAMS_METRIC, 5); // Loading the same table again does nothing - tester.load(table0); - tester.assertVerifiedConfig(1) + tester.load(table0) + .assertVerifiedConfig(1) .assertLoadedConfig(false) .assertConfigContents("nginx.conf") .assertTemporaryConfigRemoved(true) |