@@ -16,10 +16,10 @@ package sunset
1616
1717import (
1818 "encoding/json"
19- "github.com/mongodb/openapi/tools/cli/internal/openapi/sunset"
2019 "reflect"
2120 "testing"
2221
22+ "github.com/mongodb/openapi/tools/cli/internal/openapi/sunset"
2323 "github.com/spf13/afero"
2424 "github.com/stretchr/testify/assert"
2525 "github.com/stretchr/testify/require"
@@ -50,37 +50,74 @@ func TestList_Run(t *testing.T) {
5050}
5151
5252var expectedResults = []* sunset.Sunset {
53- {Operation : "GET" , Path : "/api/atlas/v2/example/info" , SunsetDate : "2025-06-01" , Team : "APIx" , Version : "2023-01-01" },
54- {Operation : "GET" , Path : "/api/atlas/v2/federationSettings/{federationSettingsId}/identityProviders/{identityProviderId}" , SunsetDate : "2025-01-01" , Team : "IAM" , Version : "2023-01-01" },
55- {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/alerts/{alertId}" , SunsetDate : "2025-05-30" , Team : "CAP" , Version : "2023-01-01" },
56- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/backup/exportBuckets" , SunsetDate : "2025-05-30" , Team : "Backup - Atlas" , Version : "2023-01-01" },
57- {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/backup/exportBuckets" , SunsetDate : "2025-05-30" , Team : "Backup - Atlas" , Version : "2023-01-01" },
58- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/backupCompliancePolicy" , SunsetDate : "2024-10-01" , Team : "Backup - Atlas" , Version : "2023-01-01" },
59- {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/clusters" , SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
60- {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" , SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
61- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" , SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
62- {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" , SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
63- {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes" , SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
64- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{databaseName}/{collectionName}" , SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
65- {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}" , SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
66- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}" , SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
67- {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}" , SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
68- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/globalWrites" , SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
69- {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/globalWrites/customZoneMapping" , SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
70- {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/globalWrites/managedNamespaces" , SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
71- {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/globalWrites/managedNamespaces" , SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
72- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs" , SunsetDate : "2025-06-01" , Team : "Atlas" , Version : "2023-01-01" },
73- {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs" , SunsetDate : "2025-06-01" , Team : "Atlas" , Version : "2023-01-01" },
74- {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment" , SunsetDate : "2026-03-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
75- {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment" , SunsetDate : "2026-03-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
76- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment" , SunsetDate : "2026-03-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
77- {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment" , SunsetDate : "2026-03-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
78- {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/invites" , SunsetDate : "2024-10-04" , Team : "IAM" , Version : "2023-01-01" },
79- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/invites" , SunsetDate : "2024-10-04" , Team : "IAM" , Version : "2023-01-01" },
80- {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/invites" , SunsetDate : "2024-10-04" , Team : "IAM" , Version : "2023-01-01" },
81- {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/invites/{invitationId}" , SunsetDate : "2024-10-04" , Team : "IAM" , Version : "2023-01-01" },
82- {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/invites/{invitationId}" , SunsetDate : "2024-10-04" , Team : "IAM" , Version : "2023-01-01" },
83- {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/invites/{invitationId}" , SunsetDate : "2024-10-04" , Team : "IAM" , Version : "2023-01-01" },
84- {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/liveMigrations" , SunsetDate : "2025-05-30" , Team : "Atlas Migrations" , Version : "2023-01-01" },
85- {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/liveMigrations/validate" , SunsetDate : "2025-05-30" , Team : "Atlas Migrations" , Version : "2023-01-01" },
53+ {Operation : "GET" , Path : "/api/atlas/v2/example/info" , SunsetDate : "2025-06-01" , Team : "APIx" ,
54+ Version : "2023-01-01" },
55+ {Operation : "GET" ,
56+ Path : "/api/atlas/v2/federationSettings/{federationSettingsId}/identityProviders/{identityProviderId}" ,
57+ SunsetDate : "2025-01-01" , Team : "IAM" , Version : "2023-01-01" },
58+ {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/alerts/{alertId}" , SunsetDate : "2025-05-30" ,
59+ Team : "CAP" , Version : "2023-01-01" },
60+ {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/backup/exportBuckets" , SunsetDate : "2025-05-30" ,
61+ Team : "Backup - Atlas" , Version : "2023-01-01" },
62+ {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/backup/exportBuckets" ,
63+ SunsetDate : "2025-05-30" , Team : "Backup - Atlas" , Version : "2023-01-01" },
64+ {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/backupCompliancePolicy" ,
65+ SunsetDate : "2024-10-01" , Team : "Backup - Atlas" , Version : "2023-01-01" },
66+ {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/clusters" ,
67+ SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
68+ {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" ,
69+ SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
70+ {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" ,
71+ SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
72+ {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" ,
73+ SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
74+ {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes" ,
75+ SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
76+ {Operation : "GET" ,
77+ Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{databaseName}/{collectionName}" ,
78+ SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
79+ {Operation : "DELETE" ,
80+ Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}" ,
81+ SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
82+ {Operation : "GET" ,
83+ Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}" ,
84+ SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
85+ {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}" ,
86+ SunsetDate : "2025-06-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
87+ {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/globalWrites" ,
88+ SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
89+ {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/globalWrites/customZoneMapping" ,
90+ SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
91+ {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/globalWrites/managedNamespaces" ,
92+ SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
93+ {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/globalWrites/managedNamespaces" ,
94+ SunsetDate : "2025-06-01" , Team : "Atlas Dedicated" , Version : "2023-01-01" },
95+ {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs" ,
96+ SunsetDate : "2025-06-01" , Team : "Atlas" , Version : "2023-01-01" },
97+ {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/processArgs" ,
98+ SunsetDate : "2025-06-01" , Team : "Atlas" , Version : "2023-01-01" },
99+ {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment" ,
100+ SunsetDate : "2026-03-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
101+ {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment" ,
102+ SunsetDate : "2026-03-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
103+ {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment" ,
104+ SunsetDate : "2026-03-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
105+ {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/clusters/{clusterName}/search/deployment" ,
106+ SunsetDate : "2026-03-01" , Team : "Search Web Platform" , Version : "2023-01-01" },
107+ {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/invites" ,
108+ SunsetDate : "2024-10-04" , Team : "IAM" , Version : "2023-01-01" },
109+ {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/invites" , SunsetDate : "2024-10-04" , Team : "IAM" ,
110+ Version : "2023-01-01" },
111+ {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/invites" , SunsetDate : "2024-10-04" , Team : "IAM" ,
112+ Version : "2023-01-01" },
113+ {Operation : "DELETE" , Path : "/api/atlas/v2/groups/{groupId}/invites/{invitationId}" , SunsetDate : "2024-10-04" ,
114+ Team : "IAM" , Version : "2023-01-01" },
115+ {Operation : "GET" , Path : "/api/atlas/v2/groups/{groupId}/invites/{invitationId}" , SunsetDate : "2024-10-04" ,
116+ Team : "IAM" , Version : "2023-01-01" },
117+ {Operation : "PATCH" , Path : "/api/atlas/v2/groups/{groupId}/invites/{invitationId}" , SunsetDate : "2024-10-04" ,
118+ Team : "IAM" , Version : "2023-01-01" },
119+ {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/liveMigrations" , SunsetDate : "2025-05-30" ,
120+ Team : "Atlas Migrations" , Version : "2023-01-01" },
121+ {Operation : "POST" , Path : "/api/atlas/v2/groups/{groupId}/liveMigrations/validate" , SunsetDate : "2025-05-30" ,
122+ Team : "Atlas Migrations" , Version : "2023-01-01" },
86123}
0 commit comments