Skip to content

Commit

Permalink
Merge pull request #560 from kian99/improve-test-speed
Browse files Browse the repository at this point in the history
feat: improve test speed
  • Loading branch information
hmlanigan authored Sep 16, 2024
2 parents 5db193f + 1780628 commit e96af9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/provider/data_source_offer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ resource "juju_application" "this" {
name = "this"
charm {
name = "postgresql"
name = "juju-qa-dummy-source"
%s
}
}
resource "juju_offer" "this" {
model = juju_model.this.name
application_name = juju_application.this.name
endpoint = "db"
endpoint = "sink"
name = %q
}
Expand Down
11 changes: 6 additions & 5 deletions internal/provider/resource_offer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestAcc_ResourceOffer(t *testing.T) {
resource.TestCheckResourceAttr("juju_integration.int", "model", destModelName),

resource.TestCheckTypeSetElemNestedAttrs("juju_integration.int", "application.*",
map[string]string{"name": "apptwo", "endpoint": "db", "offer_url": ""}),
map[string]string{"name": "apptwo", "endpoint": "source", "offer_url": ""}),

resource.TestCheckTypeSetElemNestedAttrs("juju_integration.int", "application.*",
map[string]string{"name": "", "endpoint": "", "offer_url": fmt.Sprintf("%v/%v.%v", "admin",
Expand Down Expand Up @@ -65,15 +65,15 @@ resource "juju_application" "appone" {
name = "appone"
charm {
name = "postgresql"
name = "juju-qa-dummy-source"
base = "[email protected]"
}
}
resource "juju_offer" "offerone" {
model = juju_model.modelone.name
application_name = juju_application.appone.name
endpoint = "db"
endpoint = "sink"
}
resource "juju_model" "modeldest" {
Expand All @@ -85,8 +85,8 @@ resource "juju_application" "apptwo" {
name = "apptwo"
charm {
name = "hello-juju"
base = "ubuntu@20.04"
name = "juju-qa-dummy-sink"
base = "ubuntu@22.04"
}
}
Expand All @@ -95,6 +95,7 @@ resource "juju_integration" "int" {
application {
name = juju_application.apptwo.name
endpoint = "source"
}
application {
Expand Down

0 comments on commit e96af9c

Please sign in to comment.