@@ -95,7 +95,7 @@ func workDirForImage(imageSpec string) string {
95
95
}
96
96
97
97
func startCommandForImage (imageSpec string ) string {
98
- if agents .IsOpsAgentUAPPlugin () {
98
+ if gce .IsOpsAgentUAPPlugin () {
99
99
if gce .IsWindows (imageSpec ) {
100
100
return ""
101
101
}
@@ -110,7 +110,7 @@ func startCommandForImage(imageSpec string) string {
110
110
}
111
111
112
112
func stopCommandForImage (imageSpec string ) string {
113
- if agents .IsOpsAgentUAPPlugin () {
113
+ if gce .IsOpsAgentUAPPlugin () {
114
114
if gce .IsWindows (imageSpec ) {
115
115
return ""
116
116
}
@@ -771,7 +771,7 @@ func TestCustomLogFile(t *testing.T) {
771
771
772
772
func TestPluginGetStatusReturnsHealthyStatusOnSuccessfulOpsAgentStart (t * testing.T ) {
773
773
t .Parallel ()
774
- if ! agents .IsOpsAgentUAPPlugin () {
774
+ if ! gce .IsOpsAgentUAPPlugin () {
775
775
t .SkipNow ()
776
776
}
777
777
@@ -797,7 +797,7 @@ func TestPluginGetStatusReturnsHealthyStatusOnSuccessfulOpsAgentStart(t *testing
797
797
798
798
func TestPluginGetStatusReturnsUnhealthyStatusOnSubAgentTermination (t * testing.T ) {
799
799
t .Parallel ()
800
- if ! agents .IsOpsAgentUAPPlugin () {
800
+ if ! gce .IsOpsAgentUAPPlugin () {
801
801
t .SkipNow ()
802
802
}
803
803
@@ -1728,7 +1728,7 @@ func TestResourceNameLabel(t *testing.T) {
1728
1728
1729
1729
func TestLogFilePathLabel (t * testing.T ) {
1730
1730
t .Parallel ()
1731
- if agents .IsOpsAgentUAPPlugin () {
1731
+ if gce .IsOpsAgentUAPPlugin () {
1732
1732
t .SkipNow ()
1733
1733
}
1734
1734
t .Run ("fluent-bit" , func (t * testing.T ) {
@@ -1835,7 +1835,7 @@ EOF
1835
1835
// Escape record accessor dollar-signs
1836
1836
strings .ReplaceAll (fluentBitArgs , "$" , `\$` ))
1837
1837
1838
- if agents .IsOpsAgentUAPPlugin () {
1838
+ if gce .IsOpsAgentUAPPlugin () {
1839
1839
command = fmt .Sprintf (`
1840
1840
sudo touch %s
1841
1841
sudo tee %s > /dev/null <<EOF
@@ -2918,7 +2918,7 @@ func TestPrometheusMetricsWithJSONExporter(t *testing.T) {
2918
2918
module: [default]
2919
2919
static_configs:
2920
2920
- targets:
2921
- - http://localhost:8000/data.json
2921
+ - http://localhost:8000/data.json
2922
2922
relabel_configs:
2923
2923
- source_labels: [__address__]
2924
2924
target_label: __param_target
@@ -2927,7 +2927,7 @@ func TestPrometheusMetricsWithJSONExporter(t *testing.T) {
2927
2927
target_label: instance
2928
2928
replacement: '$1'
2929
2929
- target_label: __address__
2930
- replacement: localhost:7979
2930
+ replacement: localhost:7979
2931
2931
service:
2932
2932
pipelines:
2933
2933
prom_pipeline:
@@ -3885,7 +3885,7 @@ func TestMetricsAgentCrashRestart(t *testing.T) {
3885
3885
t .Parallel ()
3886
3886
gce .RunForEachImage (t , func (t * testing.T , imageSpec string ) {
3887
3887
t .Parallel ()
3888
- if agents .IsOpsAgentUAPPlugin () {
3888
+ if gce .IsOpsAgentUAPPlugin () {
3889
3889
// Ops Agent Plugin does not restart subagents on termination.
3890
3890
t .SkipNow ()
3891
3891
}
@@ -3908,7 +3908,7 @@ func TestLoggingAgentCrashRestart(t *testing.T) {
3908
3908
t .Parallel ()
3909
3909
gce .RunForEachImage (t , func (t * testing.T , imageSpec string ) {
3910
3910
t .Parallel ()
3911
- if agents .IsOpsAgentUAPPlugin () {
3911
+ if gce .IsOpsAgentUAPPlugin () {
3912
3912
// Ops Agent Plugin does not restart subagents on termination.
3913
3913
t .SkipNow ()
3914
3914
}
@@ -3988,7 +3988,7 @@ func TestDiagnosticsCrashRestart(t *testing.T) {
3988
3988
t .Parallel ()
3989
3989
gce .RunForEachImage (t , func (t * testing.T , imageSpec string ) {
3990
3990
t .Parallel ()
3991
- if agents .IsOpsAgentUAPPlugin () {
3991
+ if gce .IsOpsAgentUAPPlugin () {
3992
3992
// Ops Agent Plugin does not restart the diagnostics service on termination.
3993
3993
t .SkipNow ()
3994
3994
}
@@ -4052,7 +4052,7 @@ func TestUpgradeOpsAgent(t *testing.T) {
4052
4052
t .Parallel ()
4053
4053
gce .RunForEachImage (t , func (t * testing.T , imageSpec string ) {
4054
4054
t .Parallel ()
4055
- if agents .IsOpsAgentUAPPlugin () {
4055
+ if gce .IsOpsAgentUAPPlugin () {
4056
4056
// Ops Agent plugin version upgrade is handled by UAP.
4057
4057
t .SkipNow ()
4058
4058
}
@@ -4571,7 +4571,7 @@ func getRecentServiceOutputForImage(imageSpec string) string {
4571
4571
}
4572
4572
4573
4573
func getHealthCheckResultsForImage (ctx context.Context , logger * log.Logger , vm * gce.VM ) (string , error ) {
4574
- if agents .IsOpsAgentUAPPlugin () {
4574
+ if gce .IsOpsAgentUAPPlugin () {
4575
4575
cmdOut , err := gce .RunRemotely (ctx , logger , vm , getHealthCheckLogsForUAPPluginByImage (vm .ImageSpec ))
4576
4576
return cmdOut .Stdout , err
4577
4577
@@ -4972,7 +4972,7 @@ func TestRestartVM(t *testing.T) {
4972
4972
t .Fatal (err )
4973
4973
}
4974
4974
4975
- isUAPPlugin := agents .IsOpsAgentUAPPlugin ()
4975
+ isUAPPlugin := gce .IsOpsAgentUAPPlugin ()
4976
4976
if isUAPPlugin {
4977
4977
cmdOut , err := gce .RunRemotely (ctx , logger , vm , getUAPPluginStatusForImage (vm .ImageSpec ))
4978
4978
if err != nil {
0 commit comments