diff --git a/acceptance/gnocchi/metric/v1/archivepolicies_test.go b/acceptance/gnocchi/metric/v1/archivepolicies_test.go index a73f8a54..55a8268e 100644 --- a/acceptance/gnocchi/metric/v1/archivepolicies_test.go +++ b/acceptance/gnocchi/metric/v1/archivepolicies_test.go @@ -23,6 +23,26 @@ func TestArchivePoliciesCRUD(t *testing.T) { // defer DeleteArchivePolicy(t, client, archivePolicy.ID) tools.PrintResource(t, archivePolicy) + + updateOpts := archivepolicies.UpdateOpts{ + Definition: []archivepolicies.ArchivePolicyDefinitionOpts{ + { + Granularity: "1:00:00", + TimeSpan: "90 days, 0:00:00", + }, + { + Granularity: "24:00:00", + TimeSpan: "365 days, 0:00:00", + }, + }, + } + t.Logf("Attempting to update an archive policy %s", archivePolicy.Name) + newArchivePolicy, err := archivepolicies.Update(client, archivePolicy.Name, updateOpts).Extract() + if err != nil { + t.Fatalf("Unable to update a Gnocchi archive policy: %v", err) + } + + tools.PrintResource(t, newArchivePolicy) } func TestArchivePoliciesList(t *testing.T) {