diff --git a/cmd/influxd/server_integration_test.go b/cmd/influxd/server_integration_test.go index df7c2e683f..686c785ea5 100644 --- a/cmd/influxd/server_integration_test.go +++ b/cmd/influxd/server_integration_test.go @@ -596,6 +596,21 @@ func runTestsData(t *testing.T, testName string, nodes Cluster, database, retent query: `SHOW RETENTION POLICIES mydatabase`, expected: `{"results":[{"series":[{"columns":["name","duration","replicaN"],"values":[["default","0",1]]}]}]}`, }, + { + name: "Ensure retention policy with infinite retention can be created", + query: `CREATE RETENTION POLICY rp1 ON mydatabase DURATION INF REPLICATION 1`, + expected: `{"results":[{}]}`, + }, + { + name: "Ensure retention policy with acceptable retention can be created", + query: `CREATE RETENTION POLICY rp2 ON mydatabase DURATION 30d REPLICATION 1`, + expected: `{"results":[{}]}`, + }, + { + name: "Ensure retention policy with unacceptable retention cannot be created", + query: `CREATE RETENTION POLICY rp3 ON mydatabase DURATION 1s REPLICATION 1`, + expected: `{"results":[{"error":"retention policy duration needs to be at least 1h0m0s"}]}`, + }, { name: "Ensure database with default retention policy can be deleted", query: `DROP DATABASE mydatabase`,