From b0b9d13b38cabfedc4a8f30294c15c709204ab3d Mon Sep 17 00:00:00 2001 From: sundowndev Date: Tue, 6 Jul 2021 17:04:05 +0200 Subject: [PATCH] test: driftctl --- pkg/driftctl_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/driftctl_test.go b/pkg/driftctl_test.go index 6683b1e5..ae853cd4 100644 --- a/pkg/driftctl_test.go +++ b/pkg/driftctl_test.go @@ -1836,9 +1836,16 @@ func TestDriftctlRun_Middlewares(t *testing.T) { }, }, }, - assert: func(result *test.ScanResult, err error) { + assert: func(t *testing.T, result *test.ScanResult, err error, store memstore.Store) { result.AssertInfrastructureIsInSync() result.AssertManagedCount(5) + + assert.Equal(t, "dev-dev", store.Bucket(memstore.TelemetryBucket).Get("version")) + assert.Equal(t, "linux", store.Bucket(memstore.TelemetryBucket).Get("os")) + assert.Equal(t, "amd64", store.Bucket(memstore.TelemetryBucket).Get("arch")) + assert.Equal(t, 5, store.Bucket(memstore.TelemetryBucket).Get("total_resources")) + assert.Equal(t, 5, store.Bucket(memstore.TelemetryBucket).Get("total_managed")) + assert.Equal(t, uint(0), store.Bucket(memstore.TelemetryBucket).Get("duration")) }, }, }