Skip to content

Commit

Permalink
Remove tests for filtered data
Browse files Browse the repository at this point in the history
This is a remnant of development journey
  • Loading branch information
DavidS-ovm committed Nov 9, 2023
1 parent cd88e44 commit 1cf2874
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions cmd/submitplan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func TestMappedItemDiffsFromPlan(t *testing.T) {
t.Error(err)
}

if len(mappedItemDiffs) != 4 {
t.Errorf("Expected 4 changes, got %v:", len(mappedItemDiffs))
if len(mappedItemDiffs) != 3 {
t.Errorf("Expected 3 changes, got %v:", len(mappedItemDiffs))
for _, diff := range mappedItemDiffs {
t.Errorf(" %v", diff)
}
Expand Down Expand Up @@ -138,22 +138,4 @@ func TestMappedItemDiffsFromPlan(t *testing.T) {
if aws_iam_policy.MappingQuery.Query != "arn:aws:iam::123456789012:policy/test-alb-ingress" {
t.Errorf("Expected aws_iam_policy query query to be 'arn:aws:iam::123456789012:policy/test-alb-ingress', got '%v'", aws_iam_policy.MappingQuery.Query)
}

// check aws_iam_policy_document
t.Logf("aws_iam_policy_document: %v", aws_iam_policy_document)
if aws_iam_policy_document == nil {
t.Fatalf("Expected aws_iam_policy_document to be set, but it's not")
}
if aws_iam_policy_document.Item.Status != sdp.ItemDiffStatus_ITEM_DIFF_STATUS_UNCHANGED {
t.Errorf("Expected aws_iam_policy_document status to be 'unchanged', but it's %v", aws_iam_policy_document.Item.Status)
}
if aws_iam_policy_document.MappingQuery != nil {
t.Errorf("Expected aws_iam_policy_document query to be nil, got '%v'", aws_iam_policy_document.MappingQuery)
}
if aws_iam_policy_document.Item.After.Scope != "terraform_plan" {
t.Errorf("Expected aws_iam_policy_document after item scope to be 'terraform_plan', got '%v'", aws_iam_policy_document.Item.After.Scope)
}
if aws_iam_policy_document.Item.After.Type != "aws_iam_policy_document" {
t.Errorf("Expected aws_iam_policy_document after item type to be 'aws_iam_policy_document', got '%v'", aws_iam_policy_document.Item.After.Type)
}
}

0 comments on commit 1cf2874

Please sign in to comment.