Skip to content

Commit e18878a

Browse files
committed
Fixed Formatting, Variable Naming and reversed the change I did in the ManagementProject struct
1 parent 2c0a660 commit e18878a

7 files changed

+117
-64
lines changed

ci_yml_templates_test.go

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,20 @@ func TestListAllTemplates(t *testing.T) {
5555
}
5656

5757
want := []*CIYMLTemplate{
58-
{Name: "5-Minute-Production-App", Content: "5-Minute-Production-App"},
59-
{Name: "Android", Content: "Android"},
60-
{Name: "Android-Fastlane", Content: "Android-Fastlane"},
61-
{Name: "Auto-DevOps", Content: "Auto-DevOps"},
58+
{
59+
Name: "5-Minute-Production-App",
60+
Content: "5-Minute-Production-App",
61+
},
62+
{
63+
Name: "Android",
64+
Content: "Android"},
65+
{
66+
Name: "Android-Fastlane",
67+
Content: "Android-Fastlane"},
68+
{
69+
Name: "Auto-DevOps",
70+
Content: "Auto-DevOps",
71+
},
6272
}
6373
if !reflect.DeepEqual(want, templates) {
6474
t.Errorf("CIYMLTemplates.ListAllTemplates returned %+v, want %+v", templates, want)
@@ -73,7 +83,7 @@ func TestGetTemplate(t *testing.T) {
7383
testMethod(t, r, http.MethodGet)
7484
fmt.Fprintf(w, `{
7585
"name": "Ruby",
76-
"content": "# This file is a template, and might need editing before it works on your project.\n# Official language image. Look for the different tagged releases at:\n# https://hub.docker.com/r/library/ruby/tags/\nimage: \"ruby:2.5\"\n\n# Pick zero or more services to be used on all builds.\n# Only needed when using a docker container to run your tests in.\n# Check out: http://docs.gitlab.com/ee/ci/services/index.html\n - mysql:latest\n - redis:latest\n - postgres:latest\n\nvariables:\n POSTGRES_DB: database_name\n\n# Cache gems in between builds\ncache:\n paths:\n - vendor/ruby\n\n# This is a basic example for a gem or script which doesn't use\n# services such as redis or postgres\nbefore_script:\n - ruby -v # Print out ruby version for debugging\n # Uncomment next line if your rails app needs a JS runtime:\n # - apt-get update -q && apt-get install nodejs -yqq\n - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby\n\n# Optional - Delete if not using \nrubocop:\n script:\n - rubocop\n\nrspec:\n script:\n - rspec spec\n\nrails:\n variables:\n DATABASE_URL: \"postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB\"\n script:\n - rails db:migrate\n - rails db:seed\n - rails test\n\n# This deploy job uses a simple deploy flow to Heroku, other providers, e.g. AWS Elastic Beanstalk\n# are supported too: https://github.com/travis-ci/dpl\ndeploy:\n type: deploy\n environment: production\n script:\n - gem install dpl\n - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_KEY\n"
86+
"content": "# This file is a template, and might need editing before it works on your project."
7787
}`)
7888
})
7989

@@ -84,7 +94,7 @@ func TestGetTemplate(t *testing.T) {
8494

8595
want := &CIYMLTemplate{
8696
Name: "Ruby",
87-
Content: "# This file is a template, and might need editing before it works on your project.\n# Official language image. Look for the different tagged releases at:\n# https://hub.docker.com/r/library/ruby/tags/\nimage: \"ruby:2.5\"\n\n# Pick zero or more services to be used on all builds.\n# Only needed when using a docker container to run your tests in.\n# Check out: http://docs.gitlab.com/ee/ci/services/index.html\n - mysql:latest\n - redis:latest\n - postgres:latest\n\nvariables:\n POSTGRES_DB: database_name\n\n# Cache gems in between builds\ncache:\n paths:\n - vendor/ruby\n\n# This is a basic example for a gem or script which doesn't use\n# services such as redis or postgres\nbefore_script:\n - ruby -v # Print out ruby version for debugging\n # Uncomment next line if your rails app needs a JS runtime:\n # - apt-get update -q && apt-get install nodejs -yqq\n - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby\n\n# Optional - Delete if not using \nrubocop:\n script:\n - rubocop\n\nrspec:\n script:\n - rspec spec\n\nrails:\n variables:\n DATABASE_URL: \"postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB\"\n script:\n - rails db:migrate\n - rails db:seed\n - rails test\n\n# This deploy job uses a simple deploy flow to Heroku, other providers, e.g. AWS Elastic Beanstalk\n# are supported too: https://github.com/travis-ci/dpl\ndeploy:\n type: deploy\n environment: production\n script:\n - gem install dpl\n - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_KEY\n",
97+
Content: "# This file is a template, and might need editing before it works on your project.",
8898
}
8999
if !reflect.DeepEqual(want, template) {
90100
t.Errorf("CIYMLTemplates.GetTemplate returned %+v, want %+v", template, want)

container_registry_test.go

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,30 +58,43 @@ func TestListRegistryRepositories(t *testing.T) {
5858
}
5959

6060
timeLayout := "2006-01-02T15:04:05.000Z"
61-
62-
created_at1, err := time.Parse(timeLayout, "2019-01-10T13:38:57.391Z")
61+
createdAt1, err := time.Parse(timeLayout, "2019-01-10T13:38:57.391Z")
6362
if err != nil {
6463
t.Errorf("ContainerRepository.ListRegistryRepositories error while parsing time: %v", err)
6564
}
6665

67-
created_at2, err := time.Parse(timeLayout, "2019-01-10T13:39:08.229Z")
66+
createdAt2, err := time.Parse(timeLayout, "2019-01-10T13:39:08.229Z")
6867
if err != nil {
6968
t.Errorf("ContainerRepository.ListRegistryRepositories error while parsing time: %v", err)
7069
}
7170

72-
cleanup_policy_started_at1, err := time.Parse(timeLayout, "2020-01-10T15:40:57.391Z")
71+
cleanupPolicyStartedAt1, err := time.Parse(timeLayout, "2020-01-10T15:40:57.391Z")
7372
if err != nil {
7473
t.Errorf("ContainerRepository.ListRegistryRepositories error while parsing time: %v", err)
7574
}
7675

77-
cleanup_policy_started_at2, err := time.Parse(timeLayout, "2020-08-17T03:12:35.489Z")
76+
cleanupPolicyStartedAt2, err := time.Parse(timeLayout, "2020-08-17T03:12:35.489Z")
7877
if err != nil {
7978
t.Errorf("ContainerRepository.ListRegistryRepositories error while parsing time: %v", err)
8079
}
8180

8281
want := []*RegistryRepository{
83-
{ID: 1, Name: "", Path: "group/project", Location: "gitlab.example.com:5000/group/project", CreatedAt: &created_at1, CleanupPolicyStartedAt: &cleanup_policy_started_at1},
84-
{ID: 2, Name: "releases", Path: "group/project/releases", Location: "gitlab.example.com:5000/group/project/releases", CreatedAt: &created_at2, CleanupPolicyStartedAt: &cleanup_policy_started_at2},
82+
{
83+
ID: 1,
84+
Name: "",
85+
Path: "group/project",
86+
Location: "gitlab.example.com:5000/group/project",
87+
CreatedAt: &createdAt1,
88+
CleanupPolicyStartedAt: &cleanupPolicyStartedAt1,
89+
},
90+
{
91+
ID: 2,
92+
Name: "releases",
93+
Path: "group/project/releases",
94+
Location: "gitlab.example.com:5000/group/project/releases",
95+
CreatedAt: &createdAt2,
96+
CleanupPolicyStartedAt: &cleanupPolicyStartedAt2,
97+
},
8598
}
8699
if !reflect.DeepEqual(want, repositories) {
87100
t.Errorf("ContainerRepository.ListRegistryRepositories returned %+v, want %+v", repositories, want)
@@ -122,14 +135,23 @@ func TestListRegistryRepositoryTags(t *testing.T) {
122135
]`)
123136
})
124137

125-
registryRepositoryTags, _, err := client.ContainerRegistry.ListRegistryRepositoryTags(5, 2, &ListRegistryRepositoryTagsOptions{})
138+
opt := &ListRegistryRepositoryTagsOptions{}
139+
registryRepositoryTags, _, err := client.ContainerRegistry.ListRegistryRepositoryTags(5, 2, opt)
126140
if err != nil {
127141
t.Errorf("ContainerRegistry.ListRegistryRepositoryTags returned error: %v", err)
128142
}
129143

130144
want := []*RegistryRepositoryTag{
131-
{Name: "A", Path: "group/project:A", Location: "gitlab.example.com:5000/group/project:A"},
132-
{Name: "latest", Path: "group/project:latest", Location: "gitlab.example.com:5000/group/project:latest"},
145+
{
146+
Name: "A",
147+
Path: "group/project:A",
148+
Location: "gitlab.example.com:5000/group/project:A",
149+
},
150+
{
151+
Name: "latest",
152+
Path: "group/project:latest",
153+
Location: "gitlab.example.com:5000/group/project:latest",
154+
},
133155
}
134156
if !reflect.DeepEqual(want, registryRepositoryTags) {
135157
t.Errorf("ContainerRepository.ListRegistryRepositoryTags returned %+v, want %+v", registryRepositoryTags, want)
@@ -209,14 +231,44 @@ func TestDeleteRegistryRepositoryTags(t *testing.T) {
209231
nameRegexKeep string
210232
olderThan string
211233
}{
212-
{"keep_atleast_5_remove_2_days_old", "[0-9a-z]{40}", 0, "", "2d"},
213-
{"remove_all_keep_5", ".*", 5, "", ""},
214-
{"remove_all_tags_keep_tags_beginning_with_stable", ".*", 0, "stable.*", ""},
215-
{"remove_all_tags_older_than_1_month", ".*", 0, "", "1month"},
234+
{
235+
"keep_atleast_5_remove_2_days_old",
236+
"[0-9a-z]{40}",
237+
0,
238+
"",
239+
"2d",
240+
},
241+
{
242+
"remove_all_keep_5",
243+
".*",
244+
5,
245+
"",
246+
"",
247+
},
248+
{
249+
"remove_all_tags_keep_tags_beginning_with_stable",
250+
".*",
251+
0,
252+
"stable.*",
253+
"",
254+
},
255+
{
256+
"remove_all_tags_older_than_1_month",
257+
".*",
258+
0,
259+
"",
260+
"1month",
261+
},
216262
}
217263
for _, tc := range tests {
218264
t.Run(tc.event, func(t *testing.T) {
219-
_, err := client.ContainerRegistry.DeleteRegistryRepositoryTags(5, 2, &DeleteRegistryRepositoryTagsOptions{NameRegexpDelete: &tc.nameRegexDelete, NameRegexpKeep: &tc.nameRegexKeep, KeepN: &tc.keepN, OlderThan: &tc.olderThan})
265+
opt := &DeleteRegistryRepositoryTagsOptions{
266+
NameRegexpDelete: &tc.nameRegexDelete,
267+
NameRegexpKeep: &tc.nameRegexKeep,
268+
KeepN: &tc.keepN,
269+
OlderThan: &tc.olderThan,
270+
}
271+
_, err := client.ContainerRegistry.DeleteRegistryRepositoryTags(5, 2, opt)
220272
if err != nil {
221273
t.Errorf("ContainerRegistry.DeleteRegistryRepositoryTags returned error: %v", err)
222274
}

deploy_keys_test.go

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ func TestListAllDeployKeys(t *testing.T) {
3434
{
3535
"id": 1,
3636
"title": "Public key",
37-
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
37+
"key": "ssh-rsa AAAA...",
3838
"created_at": "2013-10-02T10:12:29Z"
3939
},
4040
{
4141
"id": 3,
4242
"title": "Another Public key",
43-
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
43+
"key": "ssh-rsa AAAA...",
4444
"created_at": "2013-10-02T11:12:29Z"
4545
}
4646
]`)
@@ -66,13 +66,13 @@ func TestListAllDeployKeys(t *testing.T) {
6666
{
6767
ID: 1,
6868
Title: "Public key",
69-
Key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
69+
Key: "ssh-rsa AAAA...",
7070
CreatedAt: &createdAt,
7171
},
7272
{
7373
ID: 3,
7474
Title: "Another Public key",
75-
Key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
75+
Key: "ssh-rsa AAAA...",
7676
CreatedAt: &createdAt2,
7777
},
7878
}
@@ -91,14 +91,14 @@ func TestListProjectDeployKeys(t *testing.T) {
9191
{
9292
"id": 1,
9393
"title": "Public key",
94-
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
94+
"key": "ssh-rsa AAAA...",
9595
"created_at": "2013-10-02T10:12:29Z",
9696
"can_push": false
9797
},
9898
{
9999
"id": 3,
100100
"title": "Another Public key",
101-
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
101+
"key": "ssh-rsa AAAA...",
102102
"created_at": "2013-10-02T11:12:29Z",
103103
"can_push": false
104104
}
@@ -121,22 +121,20 @@ func TestListProjectDeployKeys(t *testing.T) {
121121
t.Errorf("DeployKeys.ListAllDeployKeys returned an error while parsing time: %v", err)
122122
}
123123

124-
canPush := false
125-
126124
want := []*DeployKey{
127125
{
128126
ID: 1,
129127
Title: "Public key",
130-
Key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
128+
Key: "ssh-rsa AAAA...",
131129
CreatedAt: &createdAt,
132-
CanPush: &canPush,
130+
CanPush: Bool(false),
133131
},
134132
{
135133
ID: 3,
136134
Title: "Another Public key",
137-
Key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
135+
Key: "ssh-rsa AAAA...",
138136
CreatedAt: &createdAt2,
139-
CanPush: &canPush,
137+
CanPush: Bool(false),
140138
},
141139
}
142140
if !reflect.DeepEqual(want, deployKeys) {
@@ -153,7 +151,7 @@ func TestGetDeployKey(t *testing.T) {
153151
fmt.Fprintf(w, `{
154152
"id": 1,
155153
"title": "Public key",
156-
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
154+
"key": "ssh-rsa AAAA...",
157155
"created_at": "2013-10-02T10:12:29Z",
158156
"can_push": false
159157
}`)
@@ -170,14 +168,12 @@ func TestGetDeployKey(t *testing.T) {
170168
t.Errorf("DeployKeys.ListAllDeployKeys returned an error while parsing time: %v", err)
171169
}
172170

173-
canPush := false
174-
175171
want := &DeployKey{
176172
ID: 1,
177173
Title: "Public key",
178-
Key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
174+
Key: "ssh-rsa AAAA...",
179175
CreatedAt: &createdAt,
180-
CanPush: &canPush,
176+
CanPush: Bool(false),
181177
}
182178
if !reflect.DeepEqual(want, deployKey) {
183179
t.Errorf("DeployKeys.GetDeployKey returned %+v, want %+v", deployKey, want)
@@ -199,13 +195,10 @@ func TestAddDeployKey(t *testing.T) {
199195
}`)
200196
})
201197

202-
key := "ssh-rsa AAAA..."
203-
title := "My deploy key"
204-
canPush := true
205198
opt := &AddDeployKeyOptions{
206-
Key: &key,
207-
Title: &title,
208-
CanPush: &canPush,
199+
Key: String("ssh-rsa AAAA..."),
200+
Title: String("My deploy key"),
201+
CanPush: Bool(true),
209202
}
210203
deployKey, _, err := client.DeployKeys.AddDeployKey(5, opt)
211204
if err != nil {
@@ -219,10 +212,10 @@ func TestAddDeployKey(t *testing.T) {
219212
}
220213

221214
want := &DeployKey{
222-
Title: title,
215+
Title: *String("My deploy key"),
223216
ID: 12,
224-
Key: key,
225-
CanPush: &canPush,
217+
Key: *String("ssh-rsa AAAA..."),
218+
CanPush: Bool(true),
226219
CreatedAt: &createdAt,
227220
}
228221
if !reflect.DeepEqual(want, deployKey) {
@@ -295,11 +288,9 @@ func TestUpdateDeployKey(t *testing.T) {
295288
}`)
296289
})
297290

298-
title := "New deploy key"
299-
canPush := true
300291
opt := &UpdateDeployKeyOptions{
301-
Title: &title,
302-
CanPush: &canPush,
292+
Title: String("New deploy key"),
293+
CanPush: Bool(true),
303294
}
304295
deployKey, _, err := client.DeployKeys.UpdateDeployKey(5, 11, opt)
305296
if err != nil {
@@ -314,9 +305,9 @@ func TestUpdateDeployKey(t *testing.T) {
314305

315306
want := &DeployKey{
316307
ID: 11,
317-
Title: title,
308+
Title: *String("New deploy key"),
318309
Key: "ssh-rsa AAAA...",
319-
CanPush: &canPush,
310+
CanPush: Bool(true),
320311
CreatedAt: &createdAt,
321312
}
322313
if !reflect.DeepEqual(want, deployKey) {

gitignore_templates_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func TestGetTemplates(t *testing.T) {
213213
testMethod(t, r, http.MethodGet)
214214
fmt.Fprintf(w, `{
215215
"name": "Ruby",
216-
"content": "*.gem\n*.rbc\n/.config\n/coverage/\n/InstalledFiles\n/pkg/\n/spec/reports/\n/spec/examples.txt\n/test/tmp/\n/test/version_tmp/\n/tmp/\n\n# Used by dotenv library to load environment variables.\n# .env\n\n## Specific to RubyMotion:\n.dat*\n.repl_history\nbuild/\n*.bridgesupport\nbuild-iPhoneOS/\nbuild-iPhoneSimulator/\n\n## Specific to RubyMotion (use of CocoaPods):\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control\n#\n# vendor/Pods/\n\n## Documentation cache and generated files:\n/.yardoc/\n/_yardoc/\n/doc/\n/rdoc/\n\n## Environment normalization:\n/.bundle/\n/vendor/bundle\n/lib/bundler/man/\n\n# for a library or gem, you might want to ignore these files since the code is\n# intended to run in multiple environments; otherwise, check them in:\n# Gemfile.lock\n# .ruby-version\n# .ruby-gemset\n\n# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:\n.rvmrc\n"
216+
"content": "*.gem\n*.rbc\n/.config\n/coverage/\n/InstalledFiles\n/pkg/\n/spec/reports/"
217217
}`)
218218
})
219219

@@ -224,7 +224,7 @@ func TestGetTemplates(t *testing.T) {
224224

225225
want := &GitIgnoreTemplate{
226226
Name: "Ruby",
227-
Content: "*.gem\n*.rbc\n/.config\n/coverage/\n/InstalledFiles\n/pkg/\n/spec/reports/\n/spec/examples.txt\n/test/tmp/\n/test/version_tmp/\n/tmp/\n\n# Used by dotenv library to load environment variables.\n# .env\n\n## Specific to RubyMotion:\n.dat*\n.repl_history\nbuild/\n*.bridgesupport\nbuild-iPhoneOS/\nbuild-iPhoneSimulator/\n\n## Specific to RubyMotion (use of CocoaPods):\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control\n#\n# vendor/Pods/\n\n## Documentation cache and generated files:\n/.yardoc/\n/_yardoc/\n/doc/\n/rdoc/\n\n## Environment normalization:\n/.bundle/\n/vendor/bundle\n/lib/bundler/man/\n\n# for a library or gem, you might want to ignore these files since the code is\n# intended to run in multiple environments; otherwise, check them in:\n# Gemfile.lock\n# .ruby-version\n# .ruby-gemset\n\n# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:\n.rvmrc\n",
227+
Content: "*.gem\n*.rbc\n/.config\n/coverage/\n/InstalledFiles\n/pkg/\n/spec/reports/",
228228
}
229229
if !reflect.DeepEqual(want, template) {
230230
t.Errorf("GitIgnoreTemplates.GetTemplate returned %+v, want %+v", template, want)

group_clusters.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ type GroupCluster struct {
3939
Name string `json:"name"`
4040
Domain string `json:"domain"`
4141
CreatedAt *time.Time `json:"created_at"`
42+
Managed bool `json:"managed"`
43+
Enabled bool `json:"enabled"`
4244
ProviderType string `json:"provider_type"`
4345
PlatformType string `json:"platform_type"`
4446
EnvironmentScope string `json:"environment_scope"`
4547
ClusterType string `json:"cluster_type"`
46-
Managed bool `json:"managed"`
47-
Enabled bool `json:"enabled"`
4848
User *User `json:"user"`
4949
PlatformKubernetes *PlatformKubernetes `json:"platform_kubernetes"`
5050
ManagementProject *ManagementProject `json:"management_project"`

0 commit comments

Comments
 (0)