@@ -14,14 +14,14 @@ import (
1414 "github.com/runatlantis/atlantis/server/events/models"
1515 vcsmocks "github.com/runatlantis/atlantis/server/events/vcs/mocks"
1616 "github.com/runatlantis/atlantis/server/logging"
17- "github.com/runatlantis/atlantis/server/metrics"
17+ "github.com/runatlantis/atlantis/server/metrics/metricstest "
1818 . "github.com/runatlantis/atlantis/testing"
1919)
2020
2121// Test different permutations of global and repo config.
2222func TestBuildProjectCmdCtx (t * testing.T ) {
2323 logger := logging .NewNoopLogger (t )
24- statsScope , _ , _ := metrics .NewLoggingScope (logging .NewNoopLogger (t ), "atlantis" )
24+ statsScope := metricstest .NewLoggingScope (t , logging .NewNoopLogger (t ), "atlantis" )
2525 emptyPolicySets := valid.PolicySets {
2626 Version : nil ,
2727 PolicySets : []valid.PolicySet {},
@@ -733,7 +733,7 @@ projects:
733733}
734734
735735func TestBuildProjectCmdCtx_WithRegExpCmdEnabled (t * testing.T ) {
736- statsScope , _ , _ := metrics .NewLoggingScope (logging .NewNoopLogger (t ), "atlantis" )
736+ statsScope := metricstest .NewLoggingScope (t , logging .NewNoopLogger (t ), "atlantis" )
737737 emptyPolicySets := valid.PolicySets {
738738 Version : nil ,
739739 PolicySets : []valid.PolicySet {},
@@ -863,7 +863,7 @@ projects:
863863 Ok (t , os .WriteFile (filepath .Join (tmp , "atlantis.yaml" ), []byte (c .repoCfg ), 0600 ))
864864 }
865865
866- statsScope , _ , _ := metrics .NewLoggingScope (logging .NewNoopLogger (t ), "atlantis" )
866+ statsScope := metricstest .NewLoggingScope (t , logging .NewNoopLogger (t ), "atlantis" )
867867
868868 terraformClient := tfclientmocks .NewMockClient ()
869869
@@ -952,7 +952,7 @@ projects:
952952
953953func TestBuildProjectCmdCtx_WithPolicCheckEnabled (t * testing.T ) {
954954 logger := logging .NewNoopLogger (t )
955- statsScope , _ , _ := metrics .NewLoggingScope (logging .NewNoopLogger (t ), "atlantis" )
955+ statsScope := metricstest .NewLoggingScope (t , logging .NewNoopLogger (t ), "atlantis" )
956956 emptyPolicySets := valid.PolicySets {
957957 Version : nil ,
958958 PolicySets : []valid.PolicySet {},
@@ -1110,7 +1110,7 @@ workflows:
11101110 if c .repoCfg != "" {
11111111 Ok (t , os .WriteFile (filepath .Join (tmp , "atlantis.yaml" ), []byte (c .repoCfg ), 0600 ))
11121112 }
1113- statsScope , _ , _ := metrics .NewLoggingScope (logging .NewNoopLogger (t ), "atlantis" )
1113+ statsScope := metricstest .NewLoggingScope (t , logging .NewNoopLogger (t ), "atlantis" )
11141114
11151115 terraformClient := tfclientmocks .NewMockClient ()
11161116
@@ -1262,7 +1262,7 @@ projects:
12621262 if c .repoCfg != "" {
12631263 Ok (t , os .WriteFile (filepath .Join (tmp , "atlantis.yaml" ), []byte (c .repoCfg ), 0600 ))
12641264 }
1265- statsScope , _ , _ := metrics .NewLoggingScope (logging .NewNoopLogger (t ), "atlantis" )
1265+ statsScope := metricstest .NewLoggingScope (t , logging .NewNoopLogger (t ), "atlantis" )
12661266
12671267 terraformClient := tfclientmocks .NewMockClient ()
12681268
@@ -1484,7 +1484,7 @@ autodiscover:
14841484 if c .repoCfg != "" {
14851485 Ok (t , os .WriteFile (filepath .Join (tmp , "atlantis.yaml" ), []byte (c .repoCfg ), 0600 ))
14861486 }
1487- statsScope , _ , _ := metrics .NewLoggingScope (logging .NewNoopLogger (t ), "atlantis" )
1487+ statsScope := metricstest .NewLoggingScope (t , logging .NewNoopLogger (t ), "atlantis" )
14881488
14891489 terraformClient := tfclientmocks .NewMockClient ()
14901490
0 commit comments