-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support configuring provider via environment variables (#1)
We should be able to set `base_url` and `default_namespace` via environment variables. It will add more flexibility for the provider users, as well as allow us to make the acceptance tests more dynamic. In addition, let's add `docker-compose` to support testing with local instance.
- Loading branch information
Showing
9 changed files
with
103 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
default: testacc | ||
|
||
ifdef BACKSTAGE_BASE_URL | ||
BACKSTAGE_BASE_URL := $(BACKSTAGE_BASE_URL) | ||
else | ||
BACKSTAGE_BASE_URL := http://demo.backstage.io | ||
endif | ||
|
||
# Run acceptance tests | ||
.PHONY: testacc | ||
testacc: | ||
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m -cover | ||
TF_ACC=1 BACKSTAGE_BASE_URL=${BACKSTAGE_BASE_URL} go test ./... -v $(TESTARGS) -timeout 120m -cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package backstage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package backstage | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
) | ||
|
||
func TestAccResourceLocation(t *testing.T) { | ||
if os.Getenv("ACCTEST_SKIP_RESOURCE_TEST") != "" { | ||
t.Skip("Skipping as ACCTEST_SKIP_RESOURCE_LOCATION is set") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: '3.8' | ||
services: | ||
backstage: | ||
image: roadiehq/community-backstage-image:latest | ||
ports: | ||
- '3000:7000' | ||
environment: | ||
GITHUB_TOKEN: ${GITHUB_TOKEN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters