Skip to content

Commit

Permalink
tests: all tests as unit tests rather than acceptance tests
Browse files Browse the repository at this point in the history
This provider doesn't reach out to any other systems, so we can safely run
all of the tests as normal unit tests. This allows them to be run in our
CI system.
  • Loading branch information
apparentlymart committed Aug 16, 2019
1 parent 0fc72a1 commit 4dbc80c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tls/data_source_public_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ D9Hk2MajZuFnJiqj1QIDAQAB
)

func TestAccPublicKey_dataSource(t *testing.T) {
resource.Test(t, resource.TestCase{
resource.UnitTest(t, resource.TestCase{
Providers: testProviders,
Steps: []resource.TestStep{
{
Expand Down
2 changes: 1 addition & 1 deletion tls/resource_cert_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

func TestCertRequest(t *testing.T) {
r.Test(t, r.TestCase{
r.UnitTest(t, r.TestCase{
Providers: testProviders,
Steps: []r.TestStep{
{
Expand Down
6 changes: 3 additions & 3 deletions tls/resource_locally_signed_cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func TestLocallySignedCert(t *testing.T) {
r.Test(t, r.TestCase{
r.UnitTest(t, r.TestCase{
Providers: testProviders,
Steps: []r.TestStep{
{
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestLocallySignedCert(t *testing.T) {
func TestAccLocallySignedCertRecreatesAfterExpired(t *testing.T) {
oldNow := now
var previousCert string
r.Test(t, r.TestCase{
r.UnitTest(t, r.TestCase{
Providers: testProviders,
PreCheck: setTimeForTest("2019-06-14T12:00:00Z"),
Steps: []r.TestStep{
Expand Down Expand Up @@ -223,7 +223,7 @@ func TestAccLocallySignedCertRecreatesAfterExpired(t *testing.T) {
func TestAccLocallySignedCertNotRecreatedForEarlyRenewalUpdateInFuture(t *testing.T) {
oldNow := now
var previousCert string
r.Test(t, r.TestCase{
r.UnitTest(t, r.TestCase{
Providers: testProviders,
PreCheck: setTimeForTest("2019-06-14T12:00:00Z"),
Steps: []r.TestStep{
Expand Down
4 changes: 2 additions & 2 deletions tls/resource_private_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func TestPrivateKeyRSA(t *testing.T) {
r.Test(t, r.TestCase{
r.UnitTest(t, r.TestCase{
Providers: testProviders,
Steps: []r.TestStep{
{
Expand Down Expand Up @@ -105,7 +105,7 @@ func TestPrivateKeyRSA(t *testing.T) {
}

func TestPrivateKeyECDSA(t *testing.T) {
r.Test(t, r.TestCase{
r.UnitTest(t, r.TestCase{
Providers: testProviders,
Steps: []r.TestStep{
{
Expand Down
4 changes: 2 additions & 2 deletions tls/resource_self_signed_cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ EOT
func TestAccSelfSignedCertRecreatesAfterExpired(t *testing.T) {
oldNow := now
var previousCert string
r.Test(t, r.TestCase{
r.UnitTest(t, r.TestCase{
Providers: testProviders,
PreCheck: setTimeForTest("2019-06-14T12:00:00Z"),
Steps: []r.TestStep{
Expand Down Expand Up @@ -288,7 +288,7 @@ func TestAccSelfSignedCertRecreatesAfterExpired(t *testing.T) {
func TestAccSelfSignedCertNotRecreatedForEarlyRenewalUpdateInFuture(t *testing.T) {
oldNow := now
var previousCert string
r.Test(t, r.TestCase{
r.UnitTest(t, r.TestCase{
Providers: testProviders,
PreCheck: setTimeForTest("2019-06-14T12:00:00Z"),
Steps: []r.TestStep{
Expand Down

0 comments on commit 4dbc80c

Please sign in to comment.