From c2953e4bacf1c46d8f3ef27433865909d4054535 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 15 Jun 2021 16:57:22 -0400 Subject: [PATCH] Rename tests to help tctest. Acceptance test output: % go test -v ./aws/internal/net === RUN TestCIDRBlocksEqual --- PASS: TestCIDRBlocksEqual (0.00s) === RUN TestCanonicalCIDRBlock --- PASS: TestCanonicalCIDRBlock (0.00s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws/internal/net 0.687s --- aws/internal/net/cidr_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/aws/internal/net/cidr_test.go b/aws/internal/net/cidr_test.go index ce1ccefa324..308f76a5079 100644 --- a/aws/internal/net/cidr_test.go +++ b/aws/internal/net/cidr_test.go @@ -1,10 +1,12 @@ -package net +package net_test import ( "testing" + + tfnet "github.com/terraform-providers/terraform-provider-aws/aws/internal/net" ) -func Test_CIDRBlocksEqual(t *testing.T) { +func TestCIDRBlocksEqual(t *testing.T) { for _, ts := range []struct { cidr1 string cidr2 string @@ -18,14 +20,14 @@ func Test_CIDRBlocksEqual(t *testing.T) { {"::/0", "::0/0", true}, {"", "", false}, } { - equal := CIDRBlocksEqual(ts.cidr1, ts.cidr2) + equal := tfnet.CIDRBlocksEqual(ts.cidr1, ts.cidr2) if ts.equal != equal { t.Fatalf("CIDRBlocksEqual(%q, %q) should be: %t", ts.cidr1, ts.cidr2, ts.equal) } } } -func Test_CanonicalCIDRBlock(t *testing.T) { +func TestCanonicalCIDRBlock(t *testing.T) { for _, ts := range []struct { cidr string expected string @@ -35,7 +37,7 @@ func Test_CanonicalCIDRBlock(t *testing.T) { {"::0/0", "::/0"}, {"", ""}, } { - got := CanonicalCIDRBlock(ts.cidr) + got := tfnet.CanonicalCIDRBlock(ts.cidr) if ts.expected != got { t.Fatalf("CanonicalCIDRBlock(%q) should be: %q, got: %q", ts.cidr, ts.expected, got) }