Skip to content

Commit 89539a3

Browse files
committed
fix: add testdata to BUILD.yaml & rename variable
1 parent df113fc commit 89539a3

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

components/ide/jetbrains/image/status/BUILD.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ packages:
22
- name: app
33
type: go
44
srcs:
5+
- "testdata/**"
56
- "**/*.go"
67
- "go.mod"
78
- "go.sum"

components/ide/jetbrains/image/status/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func main() {
7979
repoRoot := wsInfo.GetCheckoutLocation()
8080
gitpodConfig, err := parseGitpodConfig(repoRoot)
8181
if err != nil {
82-
log.WithError(err).Error("parse .gitpod.yml failed")
82+
log.WithError(err).Error("failed to parse .gitpod.yml")
8383
}
8484
version_2022_1, _ := version.NewVersion("2022.1")
8585
if version_2022_1.LessThanOrEqual(backendVersion) {
@@ -370,13 +370,13 @@ func updateVMOptions(config *gitpod.GitpodConfig, alias string, content string)
370370
vmoptions = deduplicateVMOption(vmoptions, userVMOptions, filterFunc)
371371
}
372372

373-
// user-defined vmoptions (.gitpod.yml)
373+
// project-defined vmoptions (.gitpod.yml)
374374
if config != nil {
375375
productConfig := getProductConfig(config, alias)
376376
if productConfig != nil {
377-
userVMOptions = strings.Fields(productConfig.VMOptions)
378-
if len(userVMOptions) > 0 {
379-
vmoptions = deduplicateVMOption(vmoptions, userVMOptions, filterFunc)
377+
projectVMOptions := strings.Fields(productConfig.VMOptions)
378+
if len(projectVMOptions) > 0 {
379+
vmoptions = deduplicateVMOption(vmoptions, projectVMOptions, filterFunc)
380380
}
381381
}
382382
}

components/ide/jetbrains/image/status/testdata/.gitpod.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2+
# Licensed under the GNU Affero General Public License (AGPL).
3+
# See License-AGPL.txt in the project root for license information.
4+
15
# see https://github.com/gitpod-io/spring-petclinic/blob/master/.gitpod.yml
26
tasks:
37
- init: ./mvnw package -DskipTests
@@ -24,4 +28,4 @@ jetbrains:
2428
version: both
2529
vmoptions: "-Xmx3g"
2630
goland:
27-
vmoptions: "-Xmx4096m -XX:MaxRAMPercentage=75"
31+
vmoptions: "-Xmx4096m -XX:MaxRAMPercentage=75"

0 commit comments

Comments
 (0)