From 1e4a1915b21a5559f9acbd3e988043e44b5b6f7d Mon Sep 17 00:00:00 2001 From: Dylan Ratcliffe Date: Thu, 15 Feb 2024 13:25:59 +0000 Subject: [PATCH] Use getter to avoid nil pointer exceptions --- cmd/submitplan_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/submitplan_test.go b/cmd/submitplan_test.go index d7b70684..1628baad 100644 --- a/cmd/submitplan_test.go +++ b/cmd/submitplan_test.go @@ -153,8 +153,8 @@ func TestMappedItemDiffsFromPlan(t *testing.T) { if secret == nil { t.Fatalf("Expected secret to be set, but it's not") } - if secret.MappingQuery.GetScope() != "dogfood.default" { - t.Errorf("Expected secret query scope to be 'dogfood.default', got '%v'", secret.MappingQuery.GetScope()) + if secret.GetMappingQuery().GetScope() != "dogfood.default" { + t.Errorf("Expected secret query scope to be 'dogfood.default', got '%v'", secret.GetMappingQuery().GetScope()) } }