@@ -186,16 +186,20 @@ func TestAccDataSourceMetric_ArchivedField(t *testing.T) {
186186
187187 // Create archived metric (without Archived field since API client doesn't support it yet)
188188 archivedMetricKey := "archived-metric"
189+ archivedMetricName := "Archived Test Metric"
190+ archivedMetricDescription := "Test metric for archived field testing"
191+ archivedUrlKind := "substring"
192+ archivedUrlSubstring := "archived-test"
189193 archivedMetricBody := ldapi.MetricPost {
190- Name : "Archived Test Metric" ,
194+ Name : & archivedMetricName ,
191195 Key : archivedMetricKey ,
192- Description : "Test metric for archived field testing" ,
196+ Description : ldapi . PtrString ( archivedMetricDescription ) ,
193197 Kind : "pageview" ,
194198 Tags : []string {"test" , "archived" },
195- Urls : []ldapi.MetricUrlPost {
199+ Urls : []ldapi.UrlPost {
196200 {
197- Kind : "substring" ,
198- Substring : "archived-test" ,
201+ Kind : & archivedUrlKind ,
202+ Substring : & archivedUrlSubstring ,
199203 },
200204 },
201205 }
@@ -204,16 +208,20 @@ func TestAccDataSourceMetric_ArchivedField(t *testing.T) {
204208
205209 // Create non-archived metric (without Archived field since API client doesn't support it yet)
206210 nonArchivedMetricKey := "non-archived-metric"
211+ nonArchivedMetricName := "Non-Archived Test Metric"
212+ nonArchivedMetricDescription := "Test metric for non-archived field testing"
213+ nonArchivedUrlKind := "substring"
214+ nonArchivedUrlSubstring := "non-archived-test"
207215 nonArchivedMetricBody := ldapi.MetricPost {
208- Name : "Non-Archived Test Metric" ,
216+ Name : & nonArchivedMetricName ,
209217 Key : nonArchivedMetricKey ,
210- Description : "Test metric for non-archived field testing" ,
218+ Description : ldapi . PtrString ( nonArchivedMetricDescription ) ,
211219 Kind : "pageview" ,
212220 Tags : []string {"test" , "non-archived" },
213- Urls : []ldapi.MetricUrlPost {
221+ Urls : []ldapi.UrlPost {
214222 {
215- Kind : "substring" ,
216- Substring : "non-archived-test" ,
223+ Kind : & nonArchivedUrlKind ,
224+ Substring : & nonArchivedUrlSubstring ,
217225 },
218226 },
219227 }
0 commit comments