Skip to content

Commit 4d443b2

Browse files
fix unit tests
1 parent 073f8eb commit 4d443b2

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tools/cli/internal/openapi/filter/code_sample_test.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ func TestCodeSampleFilter(t *testing.T) {
7676
Extensions: map[string]any{
7777
"x-sunset": "9999-12-31",
7878
"x-codeSamples": []codeSample{
79+
{
80+
Lang: "cURL",
81+
Label: "Atlas CLI",
82+
Source: "atlas api testOperationID --help",
83+
},
7984
{
8085
Lang: "cURL",
8186
Label: "curl (Service Accounts)",
@@ -88,11 +93,6 @@ func TestCodeSampleFilter(t *testing.T) {
8893
Source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest \\\n " +
8994
"--header \"Accept: application/vnd.atlas.2025-01-01+json\" \\\n " + "-X GET \"https://cloud.mongodb.com/test?pretty=true\"",
9095
},
91-
{
92-
Lang: "cURL",
93-
Label: "Atlas CLI",
94-
Source: "atlas api testOperationID --help",
95-
},
9696
},
9797
},
9898
},
@@ -145,6 +145,11 @@ func TestCodeSampleFilter(t *testing.T) {
145145
Extensions: map[string]any{
146146
"x-sunset": "9999-12-31",
147147
"x-codeSamples": []codeSample{
148+
{
149+
Lang: "cURL",
150+
Label: "Atlas CLI",
151+
Source: "atlas api testOperationID --help",
152+
},
148153
{
149154
Lang: "cURL",
150155
Label: "curl (Service Accounts)",
@@ -157,11 +162,6 @@ func TestCodeSampleFilter(t *testing.T) {
157162
Source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest \\\n " +
158163
"--header \"Accept: application/vnd.atlas.preview+json\" \\\n " + "-X GET \"https://cloud.mongodb.com/test?pretty=true\"",
159164
},
160-
{
161-
Lang: "cURL",
162-
Label: "Atlas CLI",
163-
Source: "atlas api testOperationID --help",
164-
},
165165
},
166166
},
167167
},
@@ -214,6 +214,11 @@ func TestCodeSampleFilter(t *testing.T) {
214214
Extensions: map[string]any{
215215
"x-sunset": "9999-12-31",
216216
"x-codeSamples": []codeSample{
217+
{
218+
Lang: "cURL",
219+
Label: "Atlas CLI",
220+
Source: "atlas api testOperationID --help",
221+
},
217222
{
218223
Lang: "cURL",
219224
Label: "curl (Service Accounts)",
@@ -226,11 +231,6 @@ func TestCodeSampleFilter(t *testing.T) {
226231
Source: "curl --user \"${PUBLIC_KEY}:${PRIVATE_KEY}\" \\\n --digest \\\n " +
227232
"--header \"Accept: application/vnd.atlas.2025-01-01.upcoming+json\" \\\n " + "-X GET \"https://cloud.mongodb.com/test?pretty=true\"",
228233
},
229-
{
230-
Lang: "cURL",
231-
Label: "Atlas CLI",
232-
Source: "atlas api testOperationID --help",
233-
},
234234
},
235235
},
236236
},

0 commit comments

Comments
 (0)