File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ import (
28
28
)
29
29
30
30
const (
31
- OSFamilyEnvVar = "ECS_DETAILED_OS_FAMILY"
31
+ osFamilyEnvVar = "ECS_DETAILED_OS_FAMILY"
32
32
)
33
33
34
34
func parseGMSACapability () BooleanDefaultFalse {
@@ -119,7 +119,7 @@ func GetOSFamily() string {
119
119
// GetDetailedOSFamily returns the operating system family for linux based ecs instances.
120
120
// it first checks the ECS_DETAILED_OS_FAMILY environment variable set by ecs-init, and falls back to "LINUX" if not set
121
121
func GetDetailedOSFamily () string {
122
- detailedOSFamily , ok := os .LookupEnv (OSFamilyEnvVar )
122
+ detailedOSFamily , ok := os .LookupEnv (osFamilyEnvVar )
123
123
if ! ok {
124
124
return strings .ToUpper (OSType )
125
125
}
Original file line number Diff line number Diff line change @@ -111,14 +111,14 @@ func TestParseTaskPidsLimit_Unset(t *testing.T) {
111
111
}
112
112
113
113
func TestGetDetailedOSFamilyWithValidValue (t * testing.T ) {
114
- t .Setenv (OSFamilyEnvVar , "debian_11" )
114
+ t .Setenv (osFamilyEnvVar , "debian_11" )
115
115
116
116
result := GetDetailedOSFamily ()
117
117
assert .Equal (t , "debian_11" , result )
118
118
}
119
119
120
120
func TestGetDetailedOSFamilyWithEmptyValue (t * testing.T ) {
121
- t .Setenv (OSFamilyEnvVar , "" )
121
+ t .Setenv (osFamilyEnvVar , "" )
122
122
123
123
result := GetDetailedOSFamily ()
124
124
assert .Equal (t , "" , result )
@@ -135,7 +135,7 @@ func TestGetOSFamilyAlwaysReturnsLinux(t *testing.T) {
135
135
osFamily := GetOSFamily ()
136
136
assert .Equal (t , "LINUX" , osFamily )
137
137
138
- t .Setenv (OSFamilyEnvVar , "debian_11" )
138
+ t .Setenv (osFamilyEnvVar , "debian_11" )
139
139
osFamily = GetOSFamily ()
140
140
assert .Equal (t , "LINUX" , osFamily )
141
141
}
You can’t perform that action at this time.
0 commit comments