Skip to content

Commit

Permalink
chore: revert "merge pull request juju#511 from wallyworld/parallel-t…
Browse files Browse the repository at this point in the history
…ests"

This reverts commit 440cd6a, reversing
changes made to a14a1ed.
  • Loading branch information
hmlanigan committed Jul 10, 2024
1 parent 1fb72cf commit 07a9bb1
Show file tree
Hide file tree
Showing 17 changed files with 2 additions and 247 deletions.
10 changes: 0 additions & 10 deletions internal/provider/data_source_machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ func TestAcc_DataSourceMachine_Edge(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-datasource-machine-test-model")

resource.Test(t, resource.TestCase{
Expand All @@ -40,11 +35,6 @@ func TestAcc_DataSourceMachine_Stable(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-datasource-machine-test-model")

resource.Test(t, resource.TestCase{
Expand Down
10 changes: 0 additions & 10 deletions internal/provider/data_source_model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ import (
)

func TestAcc_DataSourceModel_Edge(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-datasource-model-test")

resource.Test(t, resource.TestCase{
Expand All @@ -35,11 +30,6 @@ func TestAcc_DataSourceModel_Edge(t *testing.T) {
}

func TestAcc_DataSourceModel_Stable(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-datasource-model-test")

resource.Test(t, resource.TestCase{
Expand Down
10 changes: 0 additions & 10 deletions internal/provider/data_source_offer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ import (
)

func TestAcc_DataSourceOffer(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-datasource-offer-test-model")
// ...-test-[0-9]+ is not a valid offer name, need to remove the dash before numbers
offerName := fmt.Sprintf("tf-datasource-offer-test%d", acctest.RandInt())
Expand All @@ -37,11 +32,6 @@ func TestAcc_DataSourceOffer(t *testing.T) {
}

func TestAcc_DataSourceOffer_UpgradeProvider(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-datasource-offer-test-model")
// ...-test-[0-9]+ is not a valid offer name, need to remove the dash before numbers
offerName := fmt.Sprintf("tf-datasource-offer-test%d", acctest.RandInt())
Expand Down
5 changes: 0 additions & 5 deletions internal/provider/data_source_secrets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ import (
// blocked on the lack of schema for secret access.

func TestAcc_DataSourceSecret(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

version := os.Getenv("JUJU_AGENT_VERSION")
if version == "" || internaltesting.CompareVersions(version, "3.3.0") < 0 {
t.Skip("JUJU_AGENT_VERSION is not set or is below 3.3.0")
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package provider
// in the testing phase.

import (
"fmt"
"errors"
"net"
"os"
"strings"
Expand Down Expand Up @@ -59,7 +59,7 @@ func TypeTestingCloudFromString(from string) (CloudTesting, error) {
case string(MicroK8sTesting):
return MicroK8sTesting, nil
default:
return "", fmt.Errorf("unknown cloud type %q", from)
return "", errors.New("unknown cloud type")
}
}

Expand Down
9 changes: 0 additions & 9 deletions internal/provider/resource_access_model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ import (
)

func TestAcc_ResourceAccessModel(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

userName := acctest.RandomWithPrefix("tfuser")
userPassword := acctest.RandomWithPrefix("tf-test-user")
userName2 := acctest.RandomWithPrefix("tfuser")
Expand Down Expand Up @@ -75,10 +70,6 @@ func TestAcc_ResourceAccessModel_UpgradeProvider(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

userName := acctest.RandomWithPrefix("tfuser")
userPassword := acctest.RandomWithPrefix("tf-test-user")
Expand Down
10 changes: 0 additions & 10 deletions internal/provider/resource_access_secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ import (
// the applications used don't actually require a user secret.
// TODO(anvial): Add a test that uses a secret that is actually required by the application.
func TestAcc_ResourceAccessSecret_GrantRevoke(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

agentVersion := os.Getenv(TestJujuAgentVersion)
if agentVersion == "" {
t.Errorf("%s is not set", TestJujuAgentVersion)
Expand Down Expand Up @@ -63,11 +58,6 @@ func TestAcc_ResourceAccessSecret_GrantRevoke(t *testing.T) {
}

func TestAcc_ResourceAccessSecret_Import(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

agentVersion := os.Getenv(TestJujuAgentVersion)
if agentVersion == "" {
t.Errorf("%s is not set", TestJujuAgentVersion)
Expand Down
59 changes: 0 additions & 59 deletions internal/provider/resource_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ import (
)

func TestAcc_ResourceApplication(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-application")
appName := "test-app"

Expand Down Expand Up @@ -95,11 +90,6 @@ func TestAcc_ResourceApplication(t *testing.T) {
}

func TestAcc_ResourceApplication_Updates(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-application")
appName := "jameinel-ubuntu-lite"
if testingCloud != LXDCloudTesting {
Expand Down Expand Up @@ -172,10 +162,6 @@ func TestAcc_ResourceApplication_UpdatesRevisionConfig(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-application")
appName := "github-runner"
Expand Down Expand Up @@ -206,11 +192,6 @@ func TestAcc_ResourceApplication_UpdatesRevisionConfig(t *testing.T) {
}

func TestAcc_CharmUpdates(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-charmupdates")

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -245,11 +226,6 @@ func TestAcc_ResourceRevisionUpdatesLXD(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-resource-revision-updates-lxd")

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -284,11 +260,6 @@ func TestAcc_ResourceRevisionAddedToPlanLXD(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-resource-revision-updates-lxd")

resource.Test(t, resource.TestCase{
Expand All @@ -315,11 +286,6 @@ func TestAcc_ResourceRevisionRemovedFromPlanLXD(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-resource-revision-updates-lxd")

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -348,11 +314,6 @@ func TestAcc_ResourceRevisionUpdatesMicrok8s(t *testing.T) {
if testingCloud != MicroK8sTesting {
t.Skip(t.Name() + " only runs with Microk8s")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-resource-revision-updates-microk8s")

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -384,11 +345,6 @@ func TestAcc_ResourceRevisionUpdatesMicrok8s(t *testing.T) {
}

func TestAcc_ResourceApplication_Minimal(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-application")
var charmName string
if testingCloud == LXDCloudTesting {
Expand Down Expand Up @@ -426,11 +382,6 @@ func TestAcc_ResourceApplication_Minimal(t *testing.T) {
}

func TestAcc_ResourceApplication_UpgradeProvider(t *testing.T) {
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-application")
appName := "test-app"

Expand Down Expand Up @@ -468,11 +419,6 @@ func TestAcc_ResourceApplication_EndpointBindings(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-application-bindings")
appName := "test-app"

Expand Down Expand Up @@ -508,11 +454,6 @@ func TestAcc_ResourceApplication_UpdateEndpointBindings(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-application-bindings-update")
appName := "test-app-update"

Expand Down
10 changes: 0 additions & 10 deletions internal/provider/resource_credential_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ func TestAcc_ResourceCredential(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

credentialName := acctest.RandomWithPrefix("tf-test-credential")
authType := "certificate"
token := "123abc"
Expand Down Expand Up @@ -62,11 +57,6 @@ func TestAcc_ResourceCredential_UpgradeProvider(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

credentialName := acctest.RandomWithPrefix("tf-test-credential")
authType := "certificate"

Expand Down
20 changes: 0 additions & 20 deletions internal/provider/resource_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ func TestAcc_ResourceIntegration(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-integration")

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -59,11 +54,6 @@ func TestAcc_ResourceIntegrationWithViaCIDRs(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

srcModelName := acctest.RandomWithPrefix("tf-test-integration")
dstModelName := acctest.RandomWithPrefix("tf-test-integration-dst")
via := "127.0.0.1/32,127.0.0.3/32"
Expand Down Expand Up @@ -91,11 +81,6 @@ func TestAcc_ResourceIntegration_UpgradeProvider(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

modelName := acctest.RandomWithPrefix("tf-test-integration")

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -231,11 +216,6 @@ func TestAcc_ResourceIntegrationWithMultipleConsumers(t *testing.T) {
if testingCloud != LXDCloudTesting {
t.Skip(t.Name() + " only runs with LXD")
}
if testing.Short() {
t.Skip()
}
t.Parallel()

srcModelName := acctest.RandomWithPrefix("tf-test-integration")
dstModelName := acctest.RandomWithPrefix("tf-test-integration-dst")

Expand Down
Loading

0 comments on commit 07a9bb1

Please sign in to comment.