Skip to content

Commit

Permalink
detectors/gcp: remove CloudRunJobs constant
Browse files Browse the repository at this point in the history
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
  • Loading branch information
zchee committed Jul 29, 2022
1 parent 69870af commit 5cf62cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 0 additions & 3 deletions detectors/gcp/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const (
GKE
GCE
CloudRun
CloudRunJobs
CloudFunctions
AppEngineStandard
AppEngineFlex
Expand All @@ -49,8 +48,6 @@ func (d *Detector) CloudPlatform() Platform {
return GKE
case d.onCloudRun():
return CloudRun
case d.onCloudRunJobs():
return CloudRunJobs
case d.onCloudFunctions():
return CloudFunctions
case d.onAppEngineStandard():
Expand Down
2 changes: 1 addition & 1 deletion detectors/gcp/detector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestCloudPlatformCloudRunJobs(t *testing.T) {
},
})
platform := d.CloudPlatform()
assert.Equal(t, platform, CloudRunJobs)
assert.Equal(t, platform, CloudRun)
}

func TestCloudPlatformCloudFunctions(t *testing.T) {
Expand Down
7 changes: 3 additions & 4 deletions detectors/gcp/faas.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ const (
)

func (d *Detector) onCloudRun() bool {
_, found := d.os.LookupEnv(cloudRunConfigEnv)
return found
}
if _, found := d.os.LookupEnv(cloudRunConfigEnv); found {
return found
}

func (d *Detector) onCloudRunJobs() bool {
_, found := d.os.LookupEnv(cloudRunJobsEnv)
return found
}
Expand Down

0 comments on commit 5cf62cc

Please sign in to comment.